summaryrefslogtreecommitdiff
path: root/vchat-protocol.c
diff options
context:
space:
mode:
authorerdgeist <>2013-07-15 19:06:35 +0000
committererdgeist <>2013-07-15 19:06:35 +0000
commitf409a5e841d91237fe4034818955dd88167a679b (patch)
treebebaf6f812c1278357294f80b46bba8ff0883134 /vchat-protocol.c
parent959d7d76aec53f03463223ee64afb805e1865464 (diff)
add a global tcp-keepalive-option. thanks to Fefe
Diffstat (limited to 'vchat-protocol.c')
-rwxr-xr-xvchat-protocol.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/vchat-protocol.c b/vchat-protocol.c
index b9a5e15..b50f511 100755
--- a/vchat-protocol.c
+++ b/vchat-protocol.c
@@ -92,6 +92,11 @@ static int connect_socket( char *server, char *port ) {
92 break; /* okay we got one */ 92 break; /* okay we got one */
93 } 93 }
94 freeaddrinfo(res0); 94 freeaddrinfo(res0);
95
96 if (want_tcp_keepalive) { /* global from vchat-client.c */
97 int one=1;
98 setsockopt(s,SOL_SOCKET,SO_KEEPALIVE,&one,sizeof(one));
99 }
95 return s; 100 return s;
96} 101}
97 102
@@ -373,7 +378,7 @@ justloggedin (char *message)
373 /* we're not logged in, change status and request nicks */ 378 /* we're not logged in, change status and request nicks */
374 if (!loggedin) 379 if (!loggedin)
375 { 380 {
376 loadcfg(getstroption(CF_LOGINSCRIPT),handleline); 381 loadcfg(getstroption(CF_LOGINSCRIPT),0,handleline);
377 handleline(".S"); 382 handleline(".S");
378 loggedin = 1; 383 loggedin = 1;
379 } 384 }