projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
33ac659
)
* if we split these function calls, webcit will work in valgrind with gdb attaching.
author
Wilfried Göesgens
<willi@citadel.org>
Sun, 7 Jun 2009 14:17:22 +0000
(14:17 +0000)
committer
Wilfried Göesgens
<willi@citadel.org>
Sun, 7 Jun 2009 14:17:22 +0000
(14:17 +0000)
webcit/tcp_sockets.c
patch
|
blob
|
history
diff --git
a/webcit/tcp_sockets.c
b/webcit/tcp_sockets.c
index 00f7a273ce9cf29517ff758ef3481f731307782a..53ff1ebce774cad36594bb7773bf4370daf53637 100644
(file)
--- a/
webcit/tcp_sockets.c
+++ b/
webcit/tcp_sockets.c
@@
-398,6
+398,7
@@
int ClientGetLine(ParsedHttpHdrs *Hdr, StrBuf *Target)
*/
int ig_tcp_server(char *ip_addr, int port_number, int queue_len)
{
+ struct protoent *p;
struct sockaddr_in sin;
int s, i;
@@
-419,7
+420,9
@@
int ig_tcp_server(char *ip_addr, int port_number, int queue_len)
}
sin.sin_port = htons((u_short) port_number);
- s = socket(PF_INET, SOCK_STREAM, (getprotobyname("tcp")->p_proto));
+ p = getprotobyname("tcp");
+
+ s = socket(PF_INET, SOCK_STREAM, (p->p_proto));
if (s < 0) {
lprintf(1, "Can't create a socket: %s\n", strerror(errno));
exit(WC_EXIT_BIND);