git://scientific.zcu.cz
/
jra1mw.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
256ce12
)
socket initialized to -1
author
Daniel Kouřil
<kouril@ics.muni.cz>
Thu, 8 Dec 2011 10:28:41 +0000
(10:28 +0000)
committer
Daniel Kouřil
<kouril@ics.muni.cz>
Thu, 8 Dec 2011 10:28:41 +0000
(10:28 +0000)
emi.canl.canl-c/src/canl.c
patch
|
blob
|
blame
|
history
diff --git
a/emi.canl.canl-c/src/canl.c
b/emi.canl.canl-c/src/canl.c
index
ee800f7
..
2058ffd
100644
(file)
--- a/
emi.canl.canl-c/src/canl.c
+++ b/
emi.canl.canl-c/src/canl.c
@@
-106,6
+106,8
@@
static int init_io_content(glb_ctx *cc, io_handler *io)
goto end;
}
+ io->sock = -1;
+
end:
if (err)
update_error(cc, "failed to initialize io_handler");
@@
-232,7
+234,7
@@
int canl_io_accept(canl_ctx cc, canl_io_handler io, int new_fd,
end:
if (err)
- (io_cc)->sock =
0
;
+ (io_cc)->sock =
-1
;
return err;
}
@@
-256,7
+258,7
@@
int canl_io_close(canl_ctx cc, canl_io_handler io)
if (err <= 0)
return err;
- if (io_cc->sock) {
+ if (io_cc->sock
!= -1
) {
close (io_cc->sock);
io_cc->sock = -1;
}