comparison src/protocols/yahoo/yahoo.c @ 11318:519dc2186438

[gaim-migrate @ 13521] Bits and pieces all over the place. I was hunting down compiler warnings all over the place, with crazy CFLAGS. I think I might have got a bit carried away. I made the perl stuff compile with gcc 2.x (which don't support mixed declerations and statements), I think what I did was safe but readily admit I have no clue how all the perl stuff works. Rename gaim_presence_add_presence() to gaim_presence_add_list() (to match the header file - obviously nothing actually _uses_ this) Implement gaim_savedstatus_get_handle() because it's in the header file. Remove gaim_account_set_presence() from account.h - it's not actually implemented anywhere, so it can't be that important. committer: Tailor Script <tailor@pidgin.im>
author Stu Tomlinson <stu@nosnilmot.com>
date Sat, 20 Aug 2005 20:17:08 +0000
parents 10066662176a
children 17142948653e
comparison
equal deleted inserted replaced
11317:cdd9d1011d97 11318:519dc2186438
2108 int pktlen; 2108 int pktlen;
2109 2109
2110 if (yd->rxlen < YAHOO_PACKET_HDRLEN) 2110 if (yd->rxlen < YAHOO_PACKET_HDRLEN)
2111 return; 2111 return;
2112 2112
2113 if (strncmp(yd->rxqueue, "YMSG", MIN(4, yd->rxlen)) != 0) { 2113 if (strncmp((char *)yd->rxqueue, "YMSG", MIN(4, yd->rxlen)) != 0) {
2114 /* HEY! This isn't even a YMSG packet. What 2114 /* HEY! This isn't even a YMSG packet. What
2115 * are you trying to pull? */ 2115 * are you trying to pull? */
2116 guchar *start; 2116 guchar *start;
2117 2117
2118 gaim_debug_warning("yahoo", "Error in YMSG stream, got something not a YMSG packet!"); 2118 gaim_debug_warning("yahoo", "Error in YMSG stream, got something not a YMSG packet!");
2154 2154
2155 yahoo_packet_read(pkt, yd->rxqueue + pos, pktlen); 2155 yahoo_packet_read(pkt, yd->rxqueue + pos, pktlen);
2156 2156
2157 yd->rxlen -= YAHOO_PACKET_HDRLEN + pktlen; 2157 yd->rxlen -= YAHOO_PACKET_HDRLEN + pktlen;
2158 if (yd->rxlen) { 2158 if (yd->rxlen) {
2159 char *tmp = g_memdup(yd->rxqueue + YAHOO_PACKET_HDRLEN + pktlen, yd->rxlen); 2159 guchar *tmp = g_memdup(yd->rxqueue + YAHOO_PACKET_HDRLEN + pktlen, yd->rxlen);
2160 g_free(yd->rxqueue); 2160 g_free(yd->rxqueue);
2161 yd->rxqueue = tmp; 2161 yd->rxqueue = tmp;
2162 } else { 2162 } else {
2163 g_free(yd->rxqueue); 2163 g_free(yd->rxqueue);
2164 yd->rxqueue = NULL; 2164 yd->rxqueue = NULL;