Mercurial > pidgin
comparison src/toc.c @ 970:9eb07b383df4
[gaim-migrate @ 980]
Bleat.
committer: Tailor Script <tailor@pidgin.im>
| author | Rob Flynn <gaim@robflynn.com> |
|---|---|
| date | Wed, 11 Oct 2000 00:31:15 +0000 |
| parents | f7886476f9d9 |
| children | 26354cf6a362 |
comparison
equal
deleted
inserted
replaced
| 969:eb5a82d64ce5 | 970:9eb07b383df4 |
|---|---|
| 37 #include <sys/socket.h> | 37 #include <sys/socket.h> |
| 38 #include "multi.h" | 38 #include "multi.h" |
| 39 #include "gaim.h" | 39 #include "gaim.h" |
| 40 #include "gnome_applet_mgr.h" | 40 #include "gnome_applet_mgr.h" |
| 41 | 41 |
| 42 #define REVISION "gaim:$Revision: 976 $" | 42 #define REVISION "gaim:$Revision: 980 $" |
| 43 | 43 |
| 44 | 44 |
| 45 static unsigned int peer_ver=0; | 45 static unsigned int peer_ver=0; |
| 46 #ifdef _WIN32 | 46 #ifdef _WIN32 |
| 47 static int win32_r; | 47 static int win32_r; |
| 167 sflap_send(gc, buf2, -1, TYPE_DATA); | 167 sflap_send(gc, buf2, -1, TYPE_DATA); |
| 168 | 168 |
| 169 if (gc->keepalive < 0) | 169 if (gc->keepalive < 0) |
| 170 update_keepalive(gc, gc->options & OPT_USR_KEEPALV); | 170 update_keepalive(gc, gc->options & OPT_USR_KEEPALV); |
| 171 | 171 |
| 172 serv_finish_login(gc); | 172 serv_finish_login(gc); |
| 173 gaim_setup(gc); | 173 gaim_setup(gc); |
| 174 return 0; | 174 return 0; |
| 175 } | 175 } |
| 176 | 176 |
| 177 void toc_close(struct gaim_connection *gc) | 177 void toc_close(struct gaim_connection *gc) |
| 230 int len; | 230 int len; |
| 231 int slen=0; | 231 int slen=0; |
| 232 struct sflap_hdr hdr; | 232 struct sflap_hdr hdr; |
| 233 char obuf[MSG_LEN]; | 233 char obuf[MSG_LEN]; |
| 234 | 234 |
| 235 /* One _last_ 2048 check here! This shouldn't ever | 235 /* One _last_ 2048 check here! This shouldn't ever |
| 236 * get hit though, hopefully. If it gets hit on an IM | 236 * get hit though, hopefully. If it gets hit on an IM |
| 237 * It'll lose the last " and the message won't go through, | 237 * It'll lose the last " and the message won't go through, |
| 238 * but this'll stop a segfault. */ | 238 * but this'll stop a segfault. */ |
| 239 if (strlen(buf) > (MSG_LEN - sizeof(hdr))) { | 239 if (strlen(buf) > (MSG_LEN - sizeof(hdr))) { |
| 240 buf[MSG_LEN - sizeof(hdr) - 3] = '"'; | 240 buf[MSG_LEN - sizeof(hdr) - 3] = '"'; |
| 241 buf[MSG_LEN - sizeof(hdr) - 2] = '\0'; | 241 buf[MSG_LEN - sizeof(hdr) - 2] = '\0'; |
| 242 } | 242 } |
| 243 | 243 |
| 244 sprintf(debug_buff,"%s [Len %d]\n", buf, strlen(buf)); | 244 debug_printf("%s [Len %d]\n", buf, strlen(buf)); |
| 245 debug_print(debug_buff); | |
| 246 | |
| 247 | |
| 248 | 245 |
| 249 if (olen < 0) | 246 if (olen < 0) |
| 250 len = escape_message(buf); | 247 len = escape_message(buf); |
| 251 else | 248 else |
| 252 len = olen; | 249 len = olen; |
