From: <the...@us...> - 2006-04-18 04:03:31
|
Revision: 16053 Author: thekingant Date: 2006-04-17 21:03:18 -0700 (Mon, 17 Apr 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16053&view=rev Log Message: ----------- Fix Coverity CID 42: Possible NULL pointer dereference when the server does not give us a cookie in their reply to our login response. This should never happen. Fix Coverity CID 43 and 44: Possible NULL pointer dereference. Technically not possible... but the code is cleaner and faster this way. Fix Coverity CID 58: Fix a memleak of two small strings totaling about 10 bytes when parsing most incoming chat messages (not IM--just chat) Modified Paths: -------------- trunk/src/protocols/oscar/family_auth.c trunk/src/protocols/oscar/family_chat.c trunk/src/protocols/oscar/oscar.h trunk/src/protocols/oscar/tlv.c Modified: trunk/src/protocols/oscar/family_auth.c =================================================================== --- trunk/src/protocols/oscar/family_auth.c 2006-04-18 00:07:15 UTC (rev 16052) +++ trunk/src/protocols/oscar/family_auth.c 2006-04-18 04:03:18 UTC (rev 16053) @@ -321,9 +321,11 @@ aim_tlv_t *tmptlv; tmptlv = aim_tlv_gettlv(tlvlist, 0x0006, 1); - - info->cookielen = tmptlv->length; - info->cookie = tmptlv->value; + if (tmptlv != NULL) + { + info->cookielen = tmptlv->length; + info->cookie = tmptlv->value; + } } /* Modified: trunk/src/protocols/oscar/family_chat.c =================================================================== --- trunk/src/protocols/oscar/family_chat.c 2006-04-18 00:07:15 UTC (rev 16052) +++ trunk/src/protocols/oscar/family_chat.c 2006-04-18 04:03:18 UTC (rev 16053) @@ -156,17 +156,18 @@ aim_userinfo_t *userinfo = NULL; aim_rxcallback_t userfunc; int ret = 0; - int usercount = 0; + int usercount; guint8 detaillevel = 0; - char *roomname = NULL; + char *roomname; struct aim_chat_roominfo roominfo; guint16 tlvcount = 0; aim_tlvlist_t *tlvlist; - char *roomdesc = NULL; - guint16 flags = 0; - guint32 creationtime = 0; - guint16 maxmsglen = 0, maxvisiblemsglen = 0; - guint16 unknown_d2 = 0, unknown_d5 = 0; + aim_tlv_t *tlv; + char *roomdesc; + guint16 flags; + guint32 creationtime; + guint16 maxmsglen, maxvisiblemsglen; + guint16 unknown_d2, unknown_d5; aim_chat_readroominfo(bs, &roominfo); @@ -187,29 +188,26 @@ /* * TLV type 0x006a is the room name in Human Readable Form. */ - if (aim_tlv_gettlv(tlvlist, 0x006a, 1)) - roomname = aim_tlv_getstr(tlvlist, 0x006a, 1); + roomname = aim_tlv_getstr(tlvlist, 0x006a, 1); /* * Type 0x006f: Number of occupants. */ - if (aim_tlv_gettlv(tlvlist, 0x006f, 1)) - usercount = aim_tlv_get16(tlvlist, 0x006f, 1); + usercount = aim_tlv_get16(tlvlist, 0x006f, 1); /* * Type 0x0073: Occupant list. */ - if (aim_tlv_gettlv(tlvlist, 0x0073, 1)) { + tlv = aim_tlv_gettlv(tlvlist, 0x0073, 1); + if (tlv != NULL) + { int curoccupant = 0; - aim_tlv_t *tmptlv; ByteStream occbs; - tmptlv = aim_tlv_gettlv(tlvlist, 0x0073, 1); - /* Allocate enough userinfo structs for all occupants */ userinfo = calloc(usercount, sizeof(aim_userinfo_t)); - byte_stream_init(&occbs, tmptlv->value, tmptlv->length); + byte_stream_init(&occbs, tlv->value, tlv->length); while (curoccupant < usercount) aim_info_extract(od, &occbs, &userinfo[curoccupant++]); @@ -218,32 +216,27 @@ /* * Type 0x00c9: Flags. (AIM_CHATROOM_FLAG) */ - if (aim_tlv_gettlv(tlvlist, 0x00c9, 1)) - flags = aim_tlv_get16(tlvlist, 0x00c9, 1); + flags = aim_tlv_get16(tlvlist, 0x00c9, 1); /* * Type 0x00ca: Creation time (4 bytes) */ - if (aim_tlv_gettlv(tlvlist, 0x00ca, 1)) - creationtime = aim_tlv_get32(tlvlist, 0x00ca, 1); + creationtime = aim_tlv_get32(tlvlist, 0x00ca, 1); /* * Type 0x00d1: Maximum Message Length */ - if (aim_tlv_gettlv(tlvlist, 0x00d1, 1)) - maxmsglen = aim_tlv_get16(tlvlist, 0x00d1, 1); + maxmsglen = aim_tlv_get16(tlvlist, 0x00d1, 1); /* * Type 0x00d2: Unknown. (2 bytes) */ - if (aim_tlv_gettlv(tlvlist, 0x00d2, 1)) - unknown_d2 = aim_tlv_get16(tlvlist, 0x00d2, 1); + unknown_d2 = aim_tlv_get16(tlvlist, 0x00d2, 1); /* * Type 0x00d3: Room Description */ - if (aim_tlv_gettlv(tlvlist, 0x00d3, 1)) - roomdesc = aim_tlv_getstr(tlvlist, 0x00d3, 1); + roomdesc = aim_tlv_getstr(tlvlist, 0x00d3, 1); #if 0 /* @@ -257,8 +250,7 @@ /* * Type 0x00d5: Unknown. (1 byte) */ - if (aim_tlv_gettlv(tlvlist, 0x00d5, 1)) - unknown_d5 = aim_tlv_get8(tlvlist, 0x00d5, 1); + unknown_d5 = aim_tlv_get8(tlvlist, 0x00d5, 1); #if 0 /* @@ -293,8 +285,7 @@ /* * Type 0x00da: Maximum visible message length */ - if (aim_tlv_gettlv(tlvlist, 0x000da, 1)) - maxvisiblemsglen = aim_tlv_get16(tlvlist, 0x00da, 1); + maxvisiblemsglen = aim_tlv_get16(tlvlist, 0x00da, 1); if ((userfunc = aim_callhandler(od, snac->family, snac->subtype))) { ret = userfunc(od, conn, @@ -368,7 +359,7 @@ IcbmCookie *cookie; aim_snacid_t snacid; guint8 ckstr[8]; - aim_tlvlist_t *otl = NULL, *itl = NULL; + aim_tlvlist_t *tlvlist = NULL, *inner_tlvlist = NULL; if (!od || !conn || !msg || (msglen <= 0)) return 0; @@ -399,36 +390,36 @@ /* * Type 1: Flag meaning this message is destined to the room. */ - aim_tlvlist_add_noval(&otl, 0x0001); + aim_tlvlist_add_noval(&tlvlist, 0x0001); /* * Type 6: Reflect */ if (!(flags & AIM_CHATFLAGS_NOREFLECT)) - aim_tlvlist_add_noval(&otl, 0x0006); + aim_tlvlist_add_noval(&tlvlist, 0x0006); /* * Type 7: Autoresponse */ if (flags & AIM_CHATFLAGS_AWAY) - aim_tlvlist_add_noval(&otl, 0x0007); + aim_tlvlist_add_noval(&tlvlist, 0x0007); /* * SubTLV: Type 1: Message */ - aim_tlvlist_add_raw(&itl, 0x0001, msglen, (guchar *)msg); + aim_tlvlist_add_raw(&inner_tlvlist, 0x0001, msglen, (guchar *)msg); /* * SubTLV: Type 2: Encoding */ if (encoding != NULL) - aim_tlvlist_add_str(&itl, 0x0002, encoding); + aim_tlvlist_add_str(&inner_tlvlist, 0x0002, encoding); /* * SubTLV: Type 3: Language */ if (language != NULL) - aim_tlvlist_add_str(&itl, 0x0003, language); + aim_tlvlist_add_str(&inner_tlvlist, 0x0003, language); /* * Type 5: Message block. Contains more TLVs. @@ -437,12 +428,12 @@ * put in a message TLV however. * */ - aim_tlvlist_add_frozentlvlist(&otl, 0x0005, &itl); + aim_tlvlist_add_frozentlvlist(&tlvlist, 0x0005, &inner_tlvlist); - aim_tlvlist_write(&frame->data, &otl); + aim_tlvlist_write(&frame->data, &tlvlist); - aim_tlvlist_free(&itl); - aim_tlvlist_free(&otl); + aim_tlvlist_free(&inner_tlvlist); + aim_tlvlist_free(&tlvlist); flap_connection_send(conn, frame); @@ -482,11 +473,13 @@ aim_userinfo_t userinfo; guint8 cookie[8]; guint16 channel; - aim_tlvlist_t *otl; + aim_tlvlist_t *tlvlist; char *msg = NULL; int len = 0; char *encoding = NULL, *language = NULL; IcbmCookie *ck; + aim_tlv_t *tlv; + ByteStream tbs; memset(&userinfo, 0, sizeof(aim_userinfo_t)); @@ -517,18 +510,15 @@ /* * Start parsing TLVs right away. */ - otl = aim_tlvlist_read(bs); + tlvlist = aim_tlvlist_read(bs); /* * Type 0x0003: Source User Information */ - if (aim_tlv_gettlv(otl, 0x0003, 1)) { - aim_tlv_t *userinfotlv; - ByteStream tbs; - - userinfotlv = aim_tlv_gettlv(otl, 0x0003, 1); - - byte_stream_init(&tbs, userinfotlv->value, userinfotlv->length); + tlv = aim_tlv_gettlv(tlvlist, 0x0003, 1); + if (tlv != NULL) + { + byte_stream_init(&tbs, tlv->value, tlv->length); aim_info_extract(od, &tbs, &userinfo); } @@ -537,7 +527,7 @@ * Type 0x0001: If present, it means it was a message to the * room (as opposed to a whisper). */ - if (aim_tlv_gettlv(otl, 0x0001, 1)) { + if (aim_tlv_gettlv(tlvlist, 0x0001, 1)) { /* Unhandled */ } #endif @@ -545,36 +535,36 @@ /* * Type 0x0005: Message Block. Conains more TLVs. */ - if (aim_tlv_gettlv(otl, 0x0005, 1)) { - aim_tlvlist_t *itl; - aim_tlv_t *msgblock; - ByteStream tbs; + tlv = aim_tlv_gettlv(tlvlist, 0x0005, 1); + if (tlv != NULL) + { + aim_tlvlist_t *inner_tlvlist; + aim_tlv_t *inner_tlv; - msgblock = aim_tlv_gettlv(otl, 0x0005, 1); - byte_stream_init(&tbs, msgblock->value, msgblock->length); - itl = aim_tlvlist_read(&tbs); + byte_stream_init(&tbs, tlv->value, tlv->length); + inner_tlvlist = aim_tlvlist_read(&tbs); /* * Type 0x0001: Message. */ - if (aim_tlv_gettlv(itl, 0x0001, 1)) { - msg = aim_tlv_getstr(itl, 0x0001, 1); - len = aim_tlv_gettlv(itl, 0x0001, 1)->length; + inner_tlv = aim_tlv_gettlv(inner_tlvlist, 0x0001, 1); + if (inner_tlv != NULL) + { + len = inner_tlv->length; + msg = aim_tlv_getvalue_as_string(inner_tlv); } /* * Type 0x0002: Encoding. */ - if (aim_tlv_gettlv(itl, 0x0002, 1)) - encoding = aim_tlv_getstr(itl, 0x0002, 1); + encoding = aim_tlv_getstr(inner_tlvlist, 0x0002, 1); /* * Type 0x0003: Language. */ - if (aim_tlv_gettlv(itl, 0x0003, 1)) - language = aim_tlv_getstr(itl, 0x0003, 1); + language = aim_tlv_getstr(inner_tlvlist, 0x0003, 1); - aim_tlvlist_free(&itl); + aim_tlvlist_free(&inner_tlvlist); } if ((userfunc = aim_callhandler(od, snac->family, snac->subtype))) @@ -582,7 +572,9 @@ aim_info_free(&userinfo); free(msg); - aim_tlvlist_free(&otl); + free(encoding); + free(language); + aim_tlvlist_free(&tlvlist); return ret; } Modified: trunk/src/protocols/oscar/oscar.h =================================================================== --- trunk/src/protocols/oscar/oscar.h 2006-04-18 00:07:15 UTC (rev 16052) +++ trunk/src/protocols/oscar/oscar.h 2006-04-18 04:03:18 UTC (rev 16053) @@ -1305,6 +1305,8 @@ } aim_tlvlist_t; /* TLV handling functions */ +char *aim_tlv_getvalue_as_string(aim_tlv_t *tlv); + aim_tlv_t *aim_tlv_gettlv(aim_tlvlist_t *list, guint16 type, const int nth); int aim_tlv_getlength(aim_tlvlist_t *list, guint16 type, const int nth); char *aim_tlv_getstr(aim_tlvlist_t *list, const guint16 type, const int nth); Modified: trunk/src/protocols/oscar/tlv.c =================================================================== --- trunk/src/protocols/oscar/tlv.c 2006-04-18 00:07:15 UTC (rev 16052) +++ trunk/src/protocols/oscar/tlv.c 2006-04-18 04:03:18 UTC (rev 16053) @@ -810,6 +810,18 @@ return -1; } +char * +aim_tlv_getvalue_as_string(aim_tlv_t *tlv) +{ + char *ret; + + ret = malloc(tlv->length + 1); + memcpy(ret, tlv->value, tlv->length); + ret[tlv->length] = '\0'; + + return ret; +} + /** * Retrieve the data from the nth TLV in the given TLV chain as a string. * @@ -823,16 +835,11 @@ char *aim_tlv_getstr(aim_tlvlist_t *list, const guint16 type, const int nth) { aim_tlv_t *tlv; - char *ret; if (!(tlv = aim_tlv_gettlv(list, type, nth))) return NULL; - ret = malloc(tlv->length + 1); - memcpy(ret, tlv->value, tlv->length); - ret[tlv->length] = '\0'; - - return ret; + return aim_tlv_getvalue_as_string(tlv); } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-04-19 03:31:56
|
Revision: 16064 Author: thekingant Date: 2006-04-18 20:31:47 -0700 (Tue, 18 Apr 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16064&view=rev Log Message: ----------- Fix Coverity CID 26: A potential crash when the server sends us an incoming channel 2 ICBM of the ICQ server relay type but does not send the data normally associated with such an ICBM. This should never happen. Fix Coverity CID 45: A potential crash when the server sends us an incoming channel 2 ICBM but does not send the data normally associated with such an ICBM. This should never happen. Fix Coverity CID 47: A 1 byte memleak when signing on using the old blist method and not when using SSI. This never happens. As far as I can tell it has been like this since the beginning of time. It's a weird memleak. Fix Coverity CID 57: A memleak of the length of a screen name when searching for screen names by email address and the server returns a malformed SNAC. This should never happen. Fix Coverity CID 59: A memleak of the length of an ICBM when _parsing_ an outgoing ICBM. I don't believe this ever happens, and I suspect the code exists from a time when libfaim was perhaps being written so that it could be used in an AIM server (in addition to just a client). I should probably remove the function. Fix Coverity CID 132: A memleak of the length of the email address when searching for screen names by email address. Fix Coverity CID 146: Check the return value of read() and print a warning to the debug window. This code is only used when AOL enables their crazy AIM executable hash value stuff, which hasn't happened in 5 years or so. Fix Coverity CID 191: Comment out some code that isn't used. Fix Coverity CID 192: Get rid of a harmless assignment to a variable that wasn't used. Fix Coverity CID 194: Comment out some variables and code that isn't used. Fix Coverity CID 198: Get rid of a variable that wasn't used in gaim_ssi_parselist(). Modified Paths: -------------- trunk/src/protocols/oscar/family_admin.c trunk/src/protocols/oscar/family_feedbag.c trunk/src/protocols/oscar/family_icbm.c trunk/src/protocols/oscar/family_userlookup.c trunk/src/protocols/oscar/oscar.c trunk/src/protocols/oscar/util.c Modified: trunk/src/protocols/oscar/family_admin.c =================================================================== --- trunk/src/protocols/oscar/family_admin.c 2006-04-19 02:41:27 UTC (rev 16063) +++ trunk/src/protocols/oscar/family_admin.c 2006-04-19 03:31:47 UTC (rev 16064) @@ -224,17 +224,17 @@ int ret = 0; aim_rxcallback_t userfunc; guint16 status; - aim_tlvlist_t *tl; + /* aim_tlvlist_t *tl; */ status = byte_stream_get16(bs); - /* This is 0x0013 if unable to confirm at this time */ + /* Status is 0x0013 if unable to confirm at this time */ - tl = aim_tlvlist_read(bs); + /* tl = aim_tlvlist_read(bs); */ if ((userfunc = aim_callhandler(od, snac->family, snac->subtype))) ret = userfunc(od, conn, frame, status); - aim_tlvlist_free(&tl); + /* aim_tlvlist_free(&tl); */ return ret; } Modified: trunk/src/protocols/oscar/family_feedbag.c =================================================================== --- trunk/src/protocols/oscar/family_feedbag.c 2006-04-19 02:41:27 UTC (rev 16063) +++ trunk/src/protocols/oscar/family_feedbag.c 2006-04-19 03:31:47 UTC (rev 16064) @@ -745,8 +745,8 @@ /* Find the parent */ if (!(parent = aim_ssi_itemlist_finditem(od->ssi.local, group, NULL, AIM_SSI_TYPE_GROUP))) { /* Find the parent's parent (the master group) */ - if (!(parent = aim_ssi_itemlist_find(od->ssi.local, 0x0000, 0x0000))) - if (!(parent = aim_ssi_itemlist_add(&od->ssi.local, NULL, 0x0000, 0x0000, AIM_SSI_TYPE_GROUP, NULL))) + if (aim_ssi_itemlist_find(od->ssi.local, 0x0000, 0x0000) == NULL) + if (aim_ssi_itemlist_add(&od->ssi.local, NULL, 0x0000, 0x0000, AIM_SSI_TYPE_GROUP, NULL) == NULL) return -ENOMEM; /* Add the parent */ if (!(parent = aim_ssi_itemlist_add(&od->ssi.local, group, 0xFFFF, 0x0000, AIM_SSI_TYPE_GROUP, NULL))) @@ -1307,7 +1307,7 @@ od->ssi.received_data = 1; if ((userfunc = aim_callhandler(od, snac->family, snac->subtype))) - ret = userfunc(od, conn, frame, fmtver, od->ssi.numitems, od->ssi.official, od->ssi.timestamp); + ret = userfunc(od, conn, frame, fmtver, od->ssi.numitems, od->ssi.timestamp); } return ret; Modified: trunk/src/protocols/oscar/family_icbm.c =================================================================== --- trunk/src/protocols/oscar/family_icbm.c 2006-04-19 02:41:27 UTC (rev 16063) +++ trunk/src/protocols/oscar/family_icbm.c 2006-04-19 03:31:47 UTC (rev 16064) @@ -1306,6 +1306,7 @@ ret = userfunc(od, conn, frame, channel, sn, msg, icbmflags, flag1, flag2); free(sn); + free(msg); aim_tlvlist_free(&tlvlist); return ret; @@ -1808,16 +1809,11 @@ aim_chat_readroominfo(servdata, &args->info.chat.roominfo); args->destructor = (void *)incomingim_ch2_chat_free; - - return; } static void incomingim_ch2_icqserverrelay_free(OscarData *od, IcbmArgsCh2 *args) { - free((char *)args->info.rtfmsg.rtfmsg); - - return; } /* @@ -1832,6 +1828,10 @@ { guint16 hdrlen, anslen, msglen; + if (servdata == NULL) + /* Odd... Oh well. */ + return; + hdrlen = byte_stream_getle16(servdata); byte_stream_advance(servdata, hdrlen); @@ -1853,8 +1853,6 @@ byte_stream_advance(servdata, hdrlen); args->destructor = (void *)incomingim_ch2_icqserverrelay_free; - - return; } static void incomingim_ch2_sendfile_free(OscarData *od, IcbmArgsCh2 *args) @@ -1923,6 +1921,11 @@ * There's another block of TLVs embedded in the type 5 here. */ block1 = aim_tlv_gettlv(tlvlist, 0x0005, 1); + if (block1 == NULL) + { + /* The server sent us ch2 ICBM without ch2 info? Weird. */ + return 1; + } byte_stream_init(&bbs, block1->value, block1->length); /* Modified: trunk/src/protocols/oscar/family_userlookup.c =================================================================== --- trunk/src/protocols/oscar/family_userlookup.c 2006-04-19 02:41:27 UTC (rev 16063) +++ trunk/src/protocols/oscar/family_userlookup.c 2006-04-19 03:31:47 UTC (rev 16064) @@ -72,7 +72,7 @@ frame = flap_frame_new(od, 0x02, 10+strlen(address)); - snacid = aim_cachesnac(od, 0x000a, 0x0002, 0x0000, strdup(address), strlen(address)+1); + snacid = aim_cachesnac(od, 0x000a, 0x0002, 0x0000, address, strlen(address)+1); aim_putsnac(&frame->data, 0x000a, 0x0002, 0x0000, snacid); byte_stream_putstr(&frame->data, address); @@ -93,10 +93,10 @@ char *cur = NULL, *buf = NULL; aim_rxcallback_t userfunc; aim_snac_t *snac2; - char *searchaddr = NULL; + const char *searchaddr = NULL; if ((snac2 = aim_remsnac(od, snac->id))) - searchaddr = (char *)snac2->data; + searchaddr = (const char *)snac2->data; tlvlist = aim_tlvlist_read(bs); m = aim_tlvlist_count(&tlvlist); @@ -114,6 +114,7 @@ j++; } + free(cur); aim_tlvlist_free(&tlvlist); Modified: trunk/src/protocols/oscar/oscar.c =================================================================== --- trunk/src/protocols/oscar/oscar.c 2006-04-19 02:41:27 UTC (rev 16063) +++ trunk/src/protocols/oscar/oscar.c 2006-04-19 03:31:47 UTC (rev 16064) @@ -1179,7 +1179,6 @@ oscar_data_addhandler(od, SNAC_FAMILY_FEEDBAG, SNAC_SUBTYPE_FEEDBAG_ERROR, gaim_ssi_parseerr, 0); oscar_data_addhandler(od, SNAC_FAMILY_FEEDBAG, SNAC_SUBTYPE_FEEDBAG_RIGHTSINFO, gaim_ssi_parserights, 0); oscar_data_addhandler(od, SNAC_FAMILY_FEEDBAG, SNAC_SUBTYPE_FEEDBAG_LIST, gaim_ssi_parselist, 0); - oscar_data_addhandler(od, SNAC_FAMILY_FEEDBAG, SNAC_SUBTYPE_FEEDBAG_NOLIST, gaim_ssi_parselist, 0); oscar_data_addhandler(od, SNAC_FAMILY_FEEDBAG, SNAC_SUBTYPE_FEEDBAG_SRVACK, gaim_ssi_parseack, 0); oscar_data_addhandler(od, SNAC_FAMILY_FEEDBAG, SNAC_SUBTYPE_FEEDBAG_ADD, gaim_ssi_parseadd, 0); oscar_data_addhandler(od, SNAC_FAMILY_FEEDBAG, SNAC_SUBTYPE_FEEDBAG_RECVAUTH, gaim_ssi_authgiven, 0); @@ -1454,7 +1453,11 @@ g_free(pos); return; } - read(pos->fd, m, 16); + if (read(pos->fd, m, 16) != 16) + { + gaim_debug_warning("oscar", "Could not read full AIM login hash " + "from " AIMHASHDATA "--that's bad.\n"); + } m[16] = '\0'; gaim_debug_misc("oscar", "Sending hash: "); for (x = 0; x < 16; x++) @@ -3351,6 +3354,7 @@ } static int gaim_parse_evilnotify(OscarData *od, FlapConnection *conn, FlapFrame *fr, ...) { +#ifdef CRAZY_WARNING va_list ap; guint16 newevil; aim_userinfo_t *userinfo; @@ -3360,7 +3364,6 @@ userinfo = va_arg(ap, aim_userinfo_t *); va_end(ap); -#ifdef CRAZY_WARNING gaim_prpl_got_account_warning_level(account, (userinfo && userinfo->sn) ? userinfo->sn : NULL, (newevil/10.0) + 0.5); #endif @@ -4633,7 +4636,6 @@ guint32 tmp; va_list ap; guint16 fmtver, numitems; - struct aim_ssi_item *items; guint32 timestamp; gc = od->gc; @@ -4643,7 +4645,6 @@ va_start(ap, fr); fmtver = (guint16)va_arg(ap, int); numitems = (guint16)va_arg(ap, int); - items = va_arg(ap, struct aim_ssi_item *); timestamp = va_arg(ap, guint32); va_end(ap); Modified: trunk/src/protocols/oscar/util.c =================================================================== --- trunk/src/protocols/oscar/util.c 2006-04-19 02:41:27 UTC (rev 16063) +++ trunk/src/protocols/oscar/util.c 2006-04-19 03:31:47 UTC (rev 16064) @@ -98,11 +98,6 @@ last = next + 1; next = strchr(last, dl); } - - if (curCount < theindex) { - toReturn = malloc(sizeof(char)); - *toReturn = '\0'; - } next = strchr(last, dl); if (curCount < theindex) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-04-20 04:45:13
|
Revision: 16066 Author: thekingant Date: 2006-04-19 21:45:06 -0700 (Wed, 19 Apr 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16066&view=rev Log Message: ----------- Fix Coverity CID 45: Check to make sure a channel 2 ICBM actually contains an IP address TLV before attempting to use it. This avoids a crash when the server sends us an abnormal channel 2 ICBM. I'm not sure if that ever happens. Fix Coverity CID 204: Don't attempt to send data over a FLAP BOS connection that doesn't exist. This should never happen because the account should get disconnected first. Fix Coverity CID 205: Don't check that a variable 'od' which we know is valid is not equal to NULL in aim_search_address() in family_userlookup.c Fix Coverity CID 206: Don't check that the variable 'od' which we know is valid is not equal to NULL in aim_chat_join() in family_oservice.c Fix Coverity CID 207: I neglected to remove a "return;" line from aim_admin_setnick() in family_admin.c which caused setting your AIM screen name formatting to not work. Fix Coverity CID 208: Remove a duplicate call to gaim_connection_get_account() in peer_connection_propose() in peer.c. Fix Coverity CID 209: Remove the unused variable "username" from incomingim_chan2() in oscar.c. Fix Coverity CID 210: Remove the unused variable "account" from peer_connection_listen_cb() in peer.c. Modified Paths: -------------- trunk/src/protocols/oscar/family_admin.c trunk/src/protocols/oscar/family_icbm.c trunk/src/protocols/oscar/family_oservice.c trunk/src/protocols/oscar/family_userlookup.c trunk/src/protocols/oscar/oscar.c trunk/src/protocols/oscar/peer.c Modified: trunk/src/protocols/oscar/family_admin.c =================================================================== --- trunk/src/protocols/oscar/family_admin.c 2006-04-19 05:50:50 UTC (rev 16065) +++ trunk/src/protocols/oscar/family_admin.c 2006-04-20 04:45:06 UTC (rev 16066) @@ -128,7 +128,6 @@ aim_tlvlist_t *tl = NULL; fr = flap_frame_new(od, 0x02, 10+2+2+strlen(newnick)); - return -ENOMEM; snacid = aim_cachesnac(od, 0x0007, 0x0004, 0x0000, NULL, 0); aim_putsnac(&fr->data, 0x0007, 0x0004, 0x0000, snacid); Modified: trunk/src/protocols/oscar/family_icbm.c =================================================================== --- trunk/src/protocols/oscar/family_icbm.c 2006-04-19 05:50:50 UTC (rev 16065) +++ trunk/src/protocols/oscar/family_icbm.c 2006-04-20 04:45:06 UTC (rev 16066) @@ -1906,6 +1906,7 @@ aim_rxcallback_t userfunc; aim_tlv_t *block1, *servdatatlv; aim_tlvlist_t *list2; + aim_tlv_t *tlv; IcbmArgsCh2 args; ByteStream bbs, sdbs, *sdbsptr = NULL; guint8 *cookie2; @@ -1964,44 +1965,32 @@ * * TODO: I don't like this. Maybe just read in an int? Or inet_ntoa... */ - if (aim_tlv_gettlv(list2, 0x0002, 1)) { - aim_tlv_t *iptlv; + tlv = aim_tlv_gettlv(list2, 0x0002, 1); + if ((tlv != NULL) && (tlv->length == 4)) + snprintf(proxyip, sizeof(proxyip), "%hhu.%hhu.%hhu.%hhu", + tlv->value[0], tlv->value[1], + tlv->value[2], tlv->value[3]); - iptlv = aim_tlv_gettlv(list2, 0x0002, 1); - if (iptlv->length == 4) - snprintf(proxyip, sizeof(proxyip), "%hhu.%hhu.%hhu.%hhu", - iptlv->value[0], iptlv->value[1], - iptlv->value[2], iptlv->value[3]); - } - /* * IP address from the perspective of the client. */ - if (aim_tlv_gettlv(list2, 0x0003, 1)) { - aim_tlv_t *iptlv; + tlv = aim_tlv_gettlv(list2, 0x0003, 1); + if ((tlv != NULL) && (tlv->length == 4)) + snprintf(clientip, sizeof(clientip), "%hhu.%hhu.%hhu.%hhu", + tlv->value[0], tlv->value[1], + tlv->value[2], tlv->value[3]); - iptlv = aim_tlv_gettlv(list2, 0x0003, 1); - if (iptlv->length == 4) - snprintf(clientip, sizeof(clientip), "%hhu.%hhu.%hhu.%hhu", - iptlv->value[0], iptlv->value[1], - iptlv->value[2], iptlv->value[3]); - } - /* * Verified IP address (from the perspective of Oscar). * * This is added by the server. */ - if (aim_tlv_gettlv(list2, 0x0004, 1)) { - aim_tlv_t *iptlv; + tlv = aim_tlv_gettlv(list2, 0x0004, 1); + if ((tlv != NULL) && (tlv->length == 4)) + snprintf(verifiedip, sizeof(verifiedip), "%hhu.%hhu.%hhu.%hhu", + tlv->value[0], tlv->value[1], + tlv->value[2], tlv->value[3]); - iptlv = aim_tlv_gettlv(list2, 0x0004, 1); - if (iptlv->length == 4) - snprintf(verifiedip, sizeof(verifiedip), "%hhu.%hhu.%hhu.%hhu", - iptlv->value[0], iptlv->value[1], - iptlv->value[2], iptlv->value[3]); - } - /* * Port number for something. */ Modified: trunk/src/protocols/oscar/family_oservice.c =================================================================== --- trunk/src/protocols/oscar/family_oservice.c 2006-04-19 05:50:50 UTC (rev 16065) +++ trunk/src/protocols/oscar/family_oservice.c 2006-04-20 04:45:06 UTC (rev 16066) @@ -124,7 +124,7 @@ struct chatsnacinfo csi; conn = flap_connection_findbygroup(od, SNAC_FAMILY_BOS); - if (!od || !conn || !roomname || !strlen(roomname)) + if (!conn || !roomname || !strlen(roomname)) return -EINVAL; frame = flap_frame_new(od, 0x02, 512); Modified: trunk/src/protocols/oscar/family_userlookup.c =================================================================== --- trunk/src/protocols/oscar/family_userlookup.c 2006-04-19 05:50:50 UTC (rev 16065) +++ trunk/src/protocols/oscar/family_userlookup.c 2006-04-20 04:45:06 UTC (rev 16066) @@ -67,7 +67,7 @@ conn = flap_connection_findbygroup(od, SNAC_FAMILY_USERLOOKUP); - if (!od || !conn || !address) + if (!conn || !address) return -EINVAL; frame = flap_frame_new(od, 0x02, 10+strlen(address)); Modified: trunk/src/protocols/oscar/oscar.c =================================================================== --- trunk/src/protocols/oscar/oscar.c 2006-04-19 05:50:50 UTC (rev 16065) +++ trunk/src/protocols/oscar/oscar.c 2006-04-20 04:45:06 UTC (rev 16066) @@ -1991,7 +1991,6 @@ { GaimConnection *gc; GaimAccount *account; - const char *username = NULL; char *message = NULL; g_return_val_if_fail(od != NULL, 0); @@ -2000,7 +1999,6 @@ gc = od->gc; account = gaim_connection_get_account(gc); od = gc->proto_data; - username = gaim_account_get_username(account); if (args == NULL) return 0; Modified: trunk/src/protocols/oscar/peer.c =================================================================== --- trunk/src/protocols/oscar/peer.c 2006-04-19 05:50:50 UTC (rev 16065) +++ trunk/src/protocols/oscar/peer.c 2006-04-20 04:45:06 UTC (rev 16066) @@ -516,14 +516,12 @@ PeerConnection *conn; OscarData *od; GaimConnection *gc; - GaimAccount *account; struct sockaddr addr; socklen_t addrlen = sizeof(addr); conn = data; od = conn->od; gc = od->gc; - account = gaim_connection_get_account(gc); gaim_debug_info("oscar", "Accepting connection on listener socket.\n"); @@ -595,6 +593,13 @@ /* Send the "please connect to me!" ICBM */ bos_conn = flap_connection_findbygroup(od, SNAC_FAMILY_ICBM); + if (bos_conn == NULL) + { + /* Not good */ + peer_connection_trynext(conn); + return; + } + listener_ip = gaim_network_get_my_ip(bos_conn->fd); listener_port = gaim_network_get_port_from_fd(conn->listenerfd); if (conn->type == OSCAR_CAPABILITY_DIRECTIM) @@ -774,10 +779,7 @@ peer_connection_propose(OscarData *od, OscarCapability type, const char *sn) { PeerConnection *conn; - GaimAccount *account; - account = gaim_connection_get_account(od->gc); - if (type == OSCAR_CAPABILITY_DIRECTIM) { conn = peer_connection_find_by_type(od, sn, type); @@ -785,6 +787,7 @@ { if (conn->ready) { + GaimAccount *account; GaimConversation *conv; gaim_debug_info("oscar", "Already have a direct IM " This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-04-21 02:49:04
|
Revision: 16074 Author: thekingant Date: 2006-04-20 19:48:58 -0700 (Thu, 20 Apr 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16074&view=rev Log Message: ----------- Change the name of the oscar account preference for "always use proxy server for peer connections." The description and meaning of this preference has changed between 1.5.0 and 2.0.0. It almost has the inverse meaning of what it used to have. Also, the default changed from TRUE to FALSE, and I want to reset people's value to the default. Modified Paths: -------------- trunk/src/protocols/oscar/oscar.c trunk/src/protocols/oscar/peer.c Modified: trunk/src/protocols/oscar/oscar.c =================================================================== --- trunk/src/protocols/oscar/oscar.c 2006-04-20 05:51:37 UTC (rev 16073) +++ trunk/src/protocols/oscar/oscar.c 2006-04-21 02:48:58 UTC (rev 16074) @@ -66,7 +66,7 @@ #define OSCAR_DEFAULT_AUTHORIZATION TRUE #define OSCAR_DEFAULT_HIDE_IP TRUE #define OSCAR_DEFAULT_WEB_AWARE FALSE -#define OSCAR_DEFAULT_USE_RV_PROXY FALSE +#define OSCAR_DEFAULT_ALWAYS_USE_RV_PROXY FALSE static int caps_aim = OSCAR_CAPABILITY_CHAT | OSCAR_CAPABILITY_BUDDYICON | OSCAR_CAPABILITY_DIRECTIM | OSCAR_CAPABILITY_SENDFILE | OSCAR_CAPABILITY_INTEROPERATE | OSCAR_CAPABILITY_ICHAT; static int caps_icq = OSCAR_CAPABILITY_BUDDYICON | OSCAR_CAPABILITY_DIRECTIM | OSCAR_CAPABILITY_SENDFILE | OSCAR_CAPABILITY_ICQUTF8 | OSCAR_CAPABILITY_INTEROPERATE | OSCAR_CAPABILITY_ICHAT; @@ -6459,17 +6459,16 @@ option = gaim_account_option_string_new(_("Encoding"), "encoding", OSCAR_DEFAULT_CUSTOM_ENCODING); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); - /* TODO: Need to somehow invert this */ option = gaim_account_option_bool_new( - _("Always use AIM/ICQ proxy server\n(slower, but does not reveal your IP address)"), "use_rv_proxy", - OSCAR_DEFAULT_USE_RV_PROXY); + _("Always use AIM/ICQ proxy server\n(slower, but does not reveal your IP address)"), "always_use_rv_proxy", + OSCAR_DEFAULT_ALWAYS_USE_RV_PROXY); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); /* Preferences */ gaim_prefs_add_none("/plugins/prpl/oscar"); gaim_prefs_add_bool("/plugins/prpl/oscar/recent_buddies", FALSE); gaim_prefs_add_bool("/plugins/prpl/oscar/show_idle", FALSE); - gaim_prefs_remove("/plugins/prpl/oscar/use_rv_proxy"); + gaim_prefs_remove("/plugins/prpl/oscar/always_use_rv_proxy"); } GAIM_INIT_PLUGIN(oscar, init_plugin, info); Modified: trunk/src/protocols/oscar/peer.c =================================================================== --- trunk/src/protocols/oscar/peer.c 2006-04-20 05:51:37 UTC (rev 16073) +++ trunk/src/protocols/oscar/peer.c 2006-04-21 02:48:58 UTC (rev 16074) @@ -119,7 +119,7 @@ conn->listenerfd = -1; conn->fd = -1; conn->lastactivity = time(NULL); - conn->use_proxy |= gaim_account_get_bool(account, "use_rv_proxy", FALSE); + conn->use_proxy |= gaim_account_get_bool(account, "always_use_rv_proxy", FALSE); if (type == OSCAR_CAPABILITY_DIRECTIM) memcpy(conn->magic, "ODC2", 4); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-05-08 17:45:41
|
Revision: 16154 Author: thekingant Date: 2006-05-07 20:52:53 -0700 (Sun, 07 May 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16154&view=rev Log Message: ----------- Change the way we do batch add/remove/modifies for oscar server-stored data to try to avoid doing too many changes at once and sending a SNAC that is over the allowed limit. And the usual extra whitespace removal Modified Paths: -------------- trunk/src/protocols/oscar/family_feedbag.c trunk/src/protocols/oscar/oscar.h Modified: trunk/src/protocols/oscar/family_feedbag.c =================================================================== --- trunk/src/protocols/oscar/family_feedbag.c 2006-05-08 03:03:18 UTC (rev 16153) +++ trunk/src/protocols/oscar/family_feedbag.c 2006-05-08 03:52:53 UTC (rev 16154) @@ -45,6 +45,8 @@ #include "oscar.h" +static int aim_ssi_addmoddel(OscarData *od); + /** * Locally rebuild the 0x00c8 TLV in the additional data of the given group. * @@ -276,7 +278,7 @@ } /** - * Locally find an item given a group name, screen name, and type. If group name + * Locally find an item given a group name, screen name, and type. If group name * and screen name are null, then just return the first item of the given type. * * @param list A pointer to the current list of items. @@ -378,8 +380,8 @@ } /** - * Locally find the presence flag item, and return the setting. The returned setting is a - * bitmask of the user flags that you are visible to. See the AIM_FLAG_* #defines + * Locally find the presence flag item, and return the setting. The returned setting is a + * bitmask of the user flags that you are visible to. See the AIM_FLAG_* #defines * in oscar.h * * @param list A pointer to the current list of items. @@ -465,7 +467,7 @@ } /** - * If there are changes, then create temporary items and + * If there are changes, then create temporary items and * call addmoddel. * * @param od The oscar session. @@ -475,7 +477,14 @@ { struct aim_ssi_item *cur1, *cur2; struct aim_ssi_tmp *cur, *new; + int n = 0; + /* + * The variable "n" is used to limit the number of addmoddel's that + * are performed in a single SNAC. It will hopefully keep the size + * of the SNAC below the maximum SNAC size. + */ + if (!od) return -EINVAL; @@ -494,8 +503,9 @@ /* Additions */ if (!od->ssi.pending) { - for (cur1=od->ssi.local; cur1; cur1=cur1->next) { + for (cur1=od->ssi.local; cur1 && (n < 15); cur1=cur1->next) { if (!aim_ssi_itemlist_find(od->ssi.official, cur1->gid, cur1->bid)) { + n++; new = (struct aim_ssi_tmp *)malloc(sizeof(struct aim_ssi_tmp)); new->action = SNAC_SUBTYPE_FEEDBAG_ADD; new->ack = 0xffff; @@ -513,8 +523,9 @@ /* Deletions */ if (!od->ssi.pending) { - for (cur1=od->ssi.official; cur1; cur1=cur1->next) { + for (cur1=od->ssi.official; cur1 && (n < 15); cur1=cur1->next) { if (!aim_ssi_itemlist_find(od->ssi.local, cur1->gid, cur1->bid)) { + n++; new = (struct aim_ssi_tmp *)malloc(sizeof(struct aim_ssi_tmp)); new->action = SNAC_SUBTYPE_FEEDBAG_DEL; new->ack = 0xffff; @@ -532,9 +543,10 @@ /* Modifications */ if (!od->ssi.pending) { - for (cur1=od->ssi.local; cur1; cur1=cur1->next) { + for (cur1=od->ssi.local; cur1 && (n < 15); cur1=cur1->next) { cur2 = aim_ssi_itemlist_find(od->ssi.official, cur1->gid, cur1->bid); if (cur2 && (aim_ssi_itemlist_cmp(cur1, cur2))) { + n++; new = (struct aim_ssi_tmp *)malloc(sizeof(struct aim_ssi_tmp)); new->action = SNAC_SUBTYPE_FEEDBAG_MOD; new->ack = 0xffff; @@ -556,7 +568,7 @@ return 0; } - /* Make sure we don't send anything else between now + /* Make sure we don't send anything else between now * and when we receive the ack for the following operation */ od->ssi.waiting_for_ack = 1; @@ -692,7 +704,7 @@ cur2 = cur->next; while (cur2) { next2 = cur2->next; - if ((cur->type == cur2->type) && (cur->gid == cur2->gid) && (cur->name != NULL) && (cur2->name != NULL) && (!strcmp(cur->name, cur2->name))) { + if ((cur->type == cur2->type) && (cur->gid == cur2->gid) && (cur->name != NULL) && (cur2->name != NULL) && (!aim_sncmp(cur->name, cur2->name))) { aim_ssi_itemlist_del(&od->ssi.local, cur2); } cur2 = next2; @@ -1320,7 +1332,7 @@ * are ready to begin using the list. It will promptly give you the * presence information for everyone in your list and put your permit/deny * settings into effect. - * + * */ int aim_ssi_enable(OscarData *od) { @@ -1335,12 +1347,12 @@ /* * Subtype 0x0008/0x0009/0x000a - SSI Add/Mod/Del Item(s). * - * Sends the SNAC to add, modify, or delete an item from the server-stored + * Sends the SNAC to add, modify, or delete items from the server-stored * information. These 3 SNACs all have an identical structure. The only * difference is the subtype that is set for the SNAC. - * + * */ -int aim_ssi_addmoddel(OscarData *od) +static int aim_ssi_addmoddel(OscarData *od) { FlapConnection *conn; FlapFrame *frame; @@ -1386,7 +1398,7 @@ /* * Subtype 0x0008 - Incoming SSI add. * - * Sent by the server, for example, when someone is added to + * Sent by the server, for example, when someone is added to * your "Recent Buddies" group. */ static int parseadd(OscarData *od, FlapConnection *conn, aim_module_t *mod, FlapFrame *frame, aim_modsnac_t *snac, ByteStream *bs) Modified: trunk/src/protocols/oscar/oscar.h =================================================================== --- trunk/src/protocols/oscar/oscar.h 2006-05-08 03:03:18 UTC (rev 16153) +++ trunk/src/protocols/oscar/oscar.h 2006-05-08 03:52:53 UTC (rev 16154) @@ -1129,7 +1129,6 @@ /* 0x0004 */ int aim_ssi_reqdata(OscarData *od); /* 0x0005 */ int aim_ssi_reqifchanged(OscarData *od, time_t localstamp, guint16 localrev); /* 0x0007 */ int aim_ssi_enable(OscarData *od); -/* 0x0008 */ int aim_ssi_addmoddel(OscarData *od); /* 0x0011 */ int aim_ssi_modbegin(OscarData *od); /* 0x0012 */ int aim_ssi_modend(OscarData *od); /* 0x0014 */ int aim_ssi_sendauth(OscarData *od, char *sn, char *msg); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-05-09 00:18:55
|
Revision: 16160 Author: thekingant Date: 2006-05-08 17:18:46 -0700 (Mon, 08 May 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16160&view=rev Log Message: ----------- Fix one of those assertion failures. My bad. This might also make add notification work for ICQ, for when someone else adds you to their buddy list Modified Paths: -------------- trunk/src/protocols/oscar/oscar.c trunk/src/protocols/simple/simple.c Modified: trunk/src/protocols/oscar/oscar.c =================================================================== --- trunk/src/protocols/oscar/oscar.c 2006-05-08 04:47:56 UTC (rev 16159) +++ trunk/src/protocols/oscar/oscar.c 2006-05-09 00:18:46 UTC (rev 16160) @@ -5095,7 +5095,7 @@ buddy = gaim_find_buddy(gc->account, sn); gaim_debug_info("oscar", "ssi: %s added you to their buddy list\n", sn); - gaim_account_notify_added(gc->account, NULL, sn, (buddy ? gaim_buddy_get_alias_only(buddy) : NULL), NULL); + gaim_account_notify_added(gc->account, sn, NULL, (buddy ? gaim_buddy_get_alias_only(buddy) : NULL), NULL); return 1; } Modified: trunk/src/protocols/simple/simple.c =================================================================== --- trunk/src/protocols/simple/simple.c 2006-05-08 04:47:56 UTC (rev 16159) +++ trunk/src/protocols/simple/simple.c 2006-05-09 00:18:46 UTC (rev 16160) @@ -379,7 +379,7 @@ } g_strfreev(parts); - gaim_debug(GAIM_DEBUG_MISC, "simple", "nonce: %s realm: %s ", auth->nonce ? auth->nonce : "(null)", auth->realm ? auth->realm : "(null)"); + gaim_debug(GAIM_DEBUG_MISC, "simple", "nonce: %s realm: %s\n", auth->nonce ? auth->nonce : "(null)", auth->realm ? auth->realm : "(null)"); if(auth->realm) { auth->digest_session_key = gaim_cipher_http_digest_calculate_session_key( "md5", authuser, auth->realm, sip->password, auth->nonce, NULL); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-07-01 18:39:15
|
Revision: 16388 Author: thekingant Date: 2006-07-01 11:39:13 -0700 (Sat, 01 Jul 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16388&view=rev Log Message: ----------- When moving a buddy on AIM, remove the buddy from the server list before adding it to the new group (it used to be the other way around). The downside of this is that, if you're moving an ICQ buddy who requires authorization, you'll have to rerequest authorization. The upside of this is that it actually works, and moving an ICQ buddy won't inadvertently delete them from your list. Modified Paths: -------------- trunk/src/protocols/oscar/family_feedbag.c trunk/src/protocols/oscar/oscar.h Modified: trunk/src/protocols/oscar/family_feedbag.c =================================================================== --- trunk/src/protocols/oscar/family_feedbag.c 2006-07-01 18:06:36 UTC (rev 16387) +++ trunk/src/protocols/oscar/family_feedbag.c 2006-07-01 18:39:13 UTC (rev 16388) @@ -456,14 +456,14 @@ * @param sn The name of the buddy. * @return 1 if you are waiting for authorization; 0 if you are not */ -int aim_ssi_waitingforauth(struct aim_ssi_item *list, const char *gn, const char *sn) +gboolean aim_ssi_waitingforauth(struct aim_ssi_item *list, const char *gn, const char *sn) { struct aim_ssi_item *cur = aim_ssi_itemlist_finditem(list, gn, sn, AIM_SSI_TYPE_BUDDY); if (cur) { if (aim_tlv_gettlv(cur->data, 0x0066, 1)) - return 1; + return TRUE; } - return 0; + return FALSE; } /** @@ -945,10 +945,17 @@ */ int aim_ssi_movebuddy(OscarData *od, const char *oldgn, const char *newgn, const char *sn) { - char *alias = aim_ssi_getalias(od->ssi.local, oldgn, sn); - aim_ssi_addbuddy(od, sn, newgn, alias, NULL, NULL, aim_ssi_waitingforauth(od->ssi.local, oldgn, sn)); + char *alias; + gboolean waitingforauth; + + alias = aim_ssi_getalias(od->ssi.local, oldgn, sn); + waitingforauth = aim_ssi_waitingforauth(od->ssi.local, oldgn, sn); + aim_ssi_delbuddy(od, sn, oldgn); + aim_ssi_addbuddy(od, sn, newgn, alias, NULL, NULL, waitingforauth); + free(alias); + return 0; } Modified: trunk/src/protocols/oscar/oscar.h =================================================================== --- trunk/src/protocols/oscar/oscar.h 2006-07-01 18:06:36 UTC (rev 16387) +++ trunk/src/protocols/oscar/oscar.h 2006-07-01 18:39:13 UTC (rev 16388) @@ -1144,7 +1144,7 @@ guint32 aim_ssi_getpresence(struct aim_ssi_item *list); char *aim_ssi_getalias(struct aim_ssi_item *list, const char *gn, const char *sn); char *aim_ssi_getcomment(struct aim_ssi_item *list, const char *gn, const char *sn); -int aim_ssi_waitingforauth(struct aim_ssi_item *list, const char *gn, const char *sn); +gboolean aim_ssi_waitingforauth(struct aim_ssi_item *list, const char *gn, const char *sn); /* Client functions for changing SSI data */ int aim_ssi_addbuddy(OscarData *od, const char *name, const char *group, const char *alias, const char *comment, const char *smsnum, int needauth); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-08-13 08:41:09
|
Revision: 16735 Author: thekingant Date: 2006-08-13 01:41:07 -0700 (Sun, 13 Aug 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16735&view=rev Log Message: ----------- Oscar peer connections now use the proxy_connect_cancel() function, so they don't need to use GAIM_CONNECTION_IS_VALID() anymore. Also, peer connection attempts will time out after 15 seconds. Yay. Modified Paths: -------------- trunk/src/protocols/oscar/peer.c trunk/src/protocols/oscar/peer.h trunk/src/protocols/oscar/peer_proxy.c Modified: trunk/src/protocols/oscar/peer.c =================================================================== --- trunk/src/protocols/oscar/peer.c 2006-08-13 08:38:02 UTC (rev 16734) +++ trunk/src/protocols/oscar/peer.c 2006-08-13 08:41:07 UTC (rev 16735) @@ -139,6 +139,18 @@ else if (conn->type == OSCAR_CAPABILITY_SENDFILE) peer_oft_close(conn); + if (conn->connect_info != NULL) + { + gaim_proxy_connect_cancel(conn->connect_info); + conn->connect_info = NULL; + } + + if (conn->connect_timeout_timer != 0) + { + gaim_timeout_remove(conn->connect_timeout_timer); + conn->connect_timeout_timer = 0; + } + if (conn->watcher_incoming != 0) { gaim_input_remove(conn->watcher_incoming); @@ -472,21 +484,13 @@ static void peer_connection_established_cb(gpointer data, gint source) { - NewPeerConnectionData *new_conn_data; - GaimConnection *gc; PeerConnection *conn; - new_conn_data = data; - gc = new_conn_data->gc; - conn = new_conn_data->conn; - g_free(new_conn_data); + conn = data; - if (!GAIM_CONNECTION_IS_VALID(gc)) - { - if (source >= 0) - close(source); - return; - } + conn->connect_info = NULL; + gaim_timeout_remove(conn->connect_timeout_timer); + conn->connect_timeout_timer = 0; if (source < 0) { @@ -627,21 +631,54 @@ } /** + * This is a callback function used when we're connecting to a peer + * using either the client IP or the verified IP and the connection + * took longer than 15 seconds to complete. We do this because + * waiting for the OS to time out the connection attempt is not + * practical--the default timeout on many OSes can be 3 minutes or + * more, and users are impatient. + * + * Worst case scenario: the user is connected to the Internet using + * a modem with severe lag. The peer connections fail and Gaim falls + * back to using a proxied connection. The lower bandwidth + * limitations imposed by the proxied connection won't matter because + * the user is using a modem. + * + * I suppose this line of thinking is discriminatory against people + * with very high lag but decent throughput who are transferring + * large files. But we don't care about those people. + */ +static gboolean +peer_connection_tooktoolong(gpointer data) +{ + PeerConnection *conn; + + conn = data; + + gaim_debug_info("oscar", "Peer connection timed out after 15 seconds. " + "Trying next method...\n"); + + gaim_proxy_connect_cancel(conn->connect_info); + conn->connect_info = NULL; + conn->connect_timeout_timer = 0; + + peer_connection_trynext(conn); + + /* Cancel this timer. It'll be added again, if needed. */ + return FALSE; +} + +/** * Try to establish the given PeerConnection using a defined * sequence of steps. */ void peer_connection_trynext(PeerConnection *conn) { - NewPeerConnectionData *new_conn_data; GaimAccount *account; - new_conn_data = g_new(NewPeerConnectionData, 1); - new_conn_data->gc = conn->od->gc; - new_conn_data->conn = conn; + account = gaim_connection_get_account(conn->od->gc); - account = gaim_connection_get_account(new_conn_data->gc); - /* * Close any remnants of a previous failed connection attempt. */ @@ -667,10 +704,14 @@ g_free(tmp); } - if (gaim_proxy_connect(account, conn->verifiedip, conn->port, - peer_connection_established_cb, NULL, new_conn_data) != NULL) + conn->connect_info = gaim_proxy_connect(account, + conn->verifiedip, conn->port, + peer_connection_established_cb, NULL, conn); + if (conn->connect_info != NULL) { /* Connecting... */ + conn->connect_timeout_timer = gaim_timeout_add(15000, + peer_connection_tooktoolong, conn); return; } } @@ -698,10 +739,14 @@ g_free(tmp); } - if (gaim_proxy_connect(account, conn->clientip, conn->port, - peer_connection_established_cb, NULL, new_conn_data) != NULL) + conn->connect_info = gaim_proxy_connect(account, + conn->clientip, conn->port, + peer_connection_established_cb, NULL, conn); + if (conn->connect_info != NULL) { /* Connecting... */ + conn->connect_timeout_timer = gaim_timeout_add(15000, + peer_connection_tooktoolong, conn); return; } } @@ -714,6 +759,12 @@ if (!(conn->flags & PEER_CONNECTION_FLAG_TRIED_INCOMING) && (!conn->use_proxy)) { + NewPeerConnectionData *new_conn_data; + + new_conn_data = g_new(NewPeerConnectionData, 1); + new_conn_data->gc = conn->od->gc; + new_conn_data->conn = conn; + conn->flags |= PEER_CONNECTION_FLAG_TRIED_INCOMING; /* @@ -728,6 +779,8 @@ /* Opening listener socket... */ return; } + + g_free(new_conn_data); } /* @@ -757,18 +810,17 @@ g_free(tmp); } - if (gaim_proxy_connect(account, + conn->connect_info = gaim_proxy_connect(account, (conn->proxyip != NULL) ? conn->proxyip : PEER_PROXY_SERVER, PEER_PROXY_PORT, - peer_proxy_connection_established_cb, NULL, new_conn_data) != NULL) + peer_proxy_connection_established_cb, NULL, conn); + if (conn->connect_info != NULL) { /* Connecting... */ return; } } - g_free(new_conn_data); - /* Give up! */ peer_connection_destroy(conn, OSCAR_DISCONNECT_COULD_NOT_CONNECT); } Modified: trunk/src/protocols/oscar/peer.h =================================================================== --- trunk/src/protocols/oscar/peer.h 2006-08-13 08:38:02 UTC (rev 16734) +++ trunk/src/protocols/oscar/peer.h 2006-08-13 08:41:07 UTC (rev 16735) @@ -159,10 +159,21 @@ gpointer frame; /** + * This is only used when the peer connection is being established. + */ + GaimProxyConnectInfo *connect_info; + + /** + * This is only used when the peer connection is being established. + */ + guint connect_timeout_timer; + + /** * This is only used while the remote user is attempting to * connect to us. */ int listenerfd; + int fd; guint watcher_incoming; Modified: trunk/src/protocols/oscar/peer_proxy.c =================================================================== --- trunk/src/protocols/oscar/peer_proxy.c 2006-08-13 08:38:02 UTC (rev 16734) +++ trunk/src/protocols/oscar/peer_proxy.c 2006-08-13 08:41:07 UTC (rev 16735) @@ -328,21 +328,11 @@ void peer_proxy_connection_established_cb(gpointer data, gint source) { - NewPeerConnectionData *new_conn_data; - GaimConnection *gc; PeerConnection *conn; - new_conn_data = data; - gc = new_conn_data->gc; - conn = new_conn_data->conn; - g_free(new_conn_data); + conn = data; - if (!GAIM_CONNECTION_IS_VALID(gc)) - { - if (source >= 0) - close(source); - return; - } + conn->connect_info = NULL; if (source < 0) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-08-14 06:24:20
|
Revision: 16743 Author: thekingant Date: 2006-08-13 23:24:17 -0700 (Sun, 13 Aug 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16743&view=rev Log Message: ----------- Almost all of oscar is using gaim_proxy_connect_cancel() now Modified Paths: -------------- trunk/src/protocols/oscar/flap_connection.c trunk/src/protocols/oscar/oscar.c trunk/src/protocols/oscar/oscar.h trunk/src/protocols/oscar/peer.c trunk/src/protocols/oscar/peer.h trunk/src/protocols/oscar/peer_proxy.c Modified: trunk/src/protocols/oscar/flap_connection.c =================================================================== --- trunk/src/protocols/oscar/flap_connection.c 2006-08-14 04:43:38 UTC (rev 16742) +++ trunk/src/protocols/oscar/flap_connection.c 2006-08-14 06:24:17 UTC (rev 16743) @@ -21,6 +21,7 @@ #include "oscar.h" #include "eventloop.h" +#include "proxy.h" #ifndef _WIN32 #include <netdb.h> @@ -131,21 +132,37 @@ /** * Close (but not free) a connection. * - * This leaves everything untouched except for setting the fd - * to -1 (used to recognize dead connections). + * This cancels any currently pending connection attempt, + * closes any open fd and frees the auth cookie. * * @param conn The connection to close. */ void flap_connection_close(OscarData *od, FlapConnection *conn) { - if (conn->fd == -1) - return; + if (conn->connect_info != NULL) + { + gaim_proxy_connect_cancel(conn->connect_info); + conn->connect_info = NULL; + } - if (conn->type == SNAC_FAMILY_LOCATE) - flap_connection_send_close(od, conn); + if (conn->connect_data != NULL) + { + if (conn->type == SNAC_FAMILY_CHAT) + { + oscar_chat_destroy(conn->connect_data); + conn->connect_data = NULL; + } + } - close(conn->fd); + if (conn->fd != -1) + { + if (conn->type == SNAC_FAMILY_LOCATE) + flap_connection_send_close(od, conn); + + close(conn->fd); + conn->fd = -1; + } } static void @@ -188,6 +205,8 @@ flap_connection_close(od, conn); + g_free(conn->cookie); + if (conn->watcher_incoming != 0) gaim_input_remove(conn->watcher_incoming); if (conn->watcher_outgoing != 0) Modified: trunk/src/protocols/oscar/oscar.c =================================================================== --- trunk/src/protocols/oscar/oscar.c 2006-08-14 04:43:38 UTC (rev 16742) +++ trunk/src/protocols/oscar/oscar.c 2006-08-14 06:24:17 UTC (rev 16743) @@ -76,35 +76,11 @@ static guint8 features_icq_offline[] = {0x01}; static guint8 ck[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; -typedef struct _NewFlapConnectionData NewFlapConnectionData; -struct _NewFlapConnectionData -{ - GaimConnection *gc; - FlapConnection *conn; - guint16 cookielen; - guint8 *cookie; - gpointer data; -}; - struct create_room { char *name; int exchange; }; -struct chat_connection -{ - char *name; - char *show; /* AOL did something funny to us */ - guint16 exchange; - guint16 instance; - FlapConnection *conn; - int id; - GaimConnection *gc; /* i hate this. */ - GaimConversation *conv; /* bah. */ - int maxlen; - int maxvis; -}; - struct oscar_ask_directim_data { OscarData *od; @@ -903,7 +879,7 @@ return NULL; } -static void +void oscar_chat_destroy(struct chat_connection *cc) { g_free(cc->name); @@ -925,46 +901,25 @@ oscar_chat_destroy(cc); } -static void -destroy_new_conn_data(NewFlapConnectionData *new_conn_data) -{ - if ((new_conn_data->data != NULL) && - (new_conn_data->conn->type == SNAC_FAMILY_CHAT)) - { - oscar_chat_destroy(new_conn_data->data); - } - g_free(new_conn_data->cookie); - g_free(new_conn_data); -} - /** * This is the callback function anytime gaim_proxy_connect() * establishes a new TCP connection with an oscar host. Depending * on the type of host, we do a few different things here. */ static void -connection_established_cb(gpointer data, gint source) +connection_established_cb(gpointer data, gint source, const gchar *error_message) { - NewFlapConnectionData *new_conn_data; GaimConnection *gc; OscarData *od; GaimAccount *account; FlapConnection *conn; - new_conn_data = data; - gc = new_conn_data->gc; - - if (!GAIM_CONNECTION_IS_VALID(gc)) - { - if (source >= 0) - close(source); - destroy_new_conn_data(new_conn_data); - return; - } - - od = gc->proto_data; + conn = data; + od = conn->od; + gc = od->gc; account = gaim_connection_get_account(gc); - conn = new_conn_data->conn; + + conn->connect_info = NULL; conn->fd = source; if (source < 0) @@ -978,7 +933,6 @@ else /* Maybe we should call this for BOS connections, too? */ flap_connection_schedule_destroy(conn, OSCAR_DISCONNECT_COULD_NOT_CONNECT); - destroy_new_conn_data(new_conn_data); return; } @@ -986,7 +940,7 @@ conn->type); conn->watcher_incoming = gaim_input_add(conn->fd, GAIM_INPUT_READ, flap_connection_recv_cb, conn); - if (new_conn_data->cookie == NULL) + if (conn->cookie == NULL) { if (!aim_sn_is_icq(gaim_account_get_username(account))) /* @@ -997,8 +951,12 @@ flap_connection_send_version(od, conn); } else + { flap_connection_send_version_with_cookie(od, conn, - new_conn_data->cookielen, new_conn_data->cookie); + conn->cookielen, conn->cookie); + g_free(conn->cookie); + conn->cookie = NULL; + } if (conn->type == SNAC_FAMILY_AUTH) { @@ -1014,11 +972,9 @@ } else if (conn->type == SNAC_FAMILY_CHAT) { - od->oscar_chats = g_slist_append(od->oscar_chats, new_conn_data->data); - new_conn_data->data = NULL; + od->oscar_chats = g_slist_append(od->oscar_chats, conn->connect_data); + conn->connect_data = NULL; } - - destroy_new_conn_data(new_conn_data); } static void @@ -1152,7 +1108,7 @@ { GaimConnection *gc; OscarData *od; - NewFlapConnectionData *new_conn_data; + FlapConnection *newconn; gc = gaim_account_get_connection(account); od = gc->proto_data = oscar_data_new(); @@ -1240,17 +1196,12 @@ /* Connect to core Gaim signals */ gaim_prefs_connect_callback(gc, "/plugins/prpl/oscar/recent_buddies", recent_buddies_cb, gc); - new_conn_data = g_new(NewFlapConnectionData, 1); - new_conn_data->gc = gc; - new_conn_data->conn = flap_connection_new(od, SNAC_FAMILY_AUTH); - new_conn_data->cookielen = 0; - new_conn_data->cookie = NULL; - new_conn_data->data = NULL; - - if (gaim_proxy_connect(account, + newconn = flap_connection_new(od, SNAC_FAMILY_AUTH); + newconn->connect_info = gaim_proxy_connect(account, gaim_account_get_string(account, "server", OSCAR_DEFAULT_LOGIN_SERVER), gaim_account_get_int(account, "port", OSCAR_DEFAULT_LOGIN_PORT), - connection_established_cb, new_conn_data) == NULL) + connection_established_cb, newconn); + if (newconn->connect_info == NULL) { gaim_connection_error(gc, _("Couldn't connect to host")); return; @@ -1295,8 +1246,7 @@ GaimAccount *account = gc->account; char *host; int port; int i; - GaimProxyConnectInfo *connect_info; - NewFlapConnectionData *new_conn_data; + FlapConnection *newconn; va_list ap; struct aim_authresp_info *info; @@ -1361,16 +1311,14 @@ } } host = g_strndup(info->bosip, i); - new_conn_data = g_new(NewFlapConnectionData, 1); - new_conn_data->gc = gc; - new_conn_data->conn = flap_connection_new(od, SNAC_FAMILY_LOCATE); - new_conn_data->cookielen = info->cookielen; - new_conn_data->cookie = g_memdup(info->cookie, info->cookielen); - new_conn_data->data = NULL; - connect_info = gaim_proxy_connect(gc->account, host, port, - connection_established_cb, new_conn_data); + newconn = flap_connection_new(od, SNAC_FAMILY_LOCATE); + newconn->cookielen = info->cookielen; + newconn->cookie = g_memdup(info->cookie, info->cookielen); + newconn->connect_info = gaim_proxy_connect(account, host, port, + connection_established_cb, newconn); g_free(host); - if (connect_info == NULL) { + if (newconn->connect_info == NULL) + { gaim_connection_error(gc, _("Could Not Connect")); od->killme = TRUE; return 0; @@ -1482,11 +1430,18 @@ } static void -straight_to_hell(gpointer data, gint source) +straight_to_hell(gpointer data, gint source, const gchar *error_message) { struct pieceofcrap *pos = data; gchar *buf; + if (!GAIM_CONNECTION_IS_VALID(pos->gc)) + { + g_free(pos->modname); + g_free(pos); + return; + } + pos->fd = source; if (source < 0) { @@ -1496,8 +1451,7 @@ _("Gaim was unable to get a valid AIM login hash."), buf); g_free(buf); - if (pos->modname) - g_free(pos->modname); + g_free(pos->modname); g_free(pos); return; } @@ -1506,8 +1460,7 @@ pos->offset, pos->len, pos->modname ? pos->modname : ""); write(pos->fd, buf, strlen(buf)); g_free(buf); - if (pos->modname) - g_free(pos->modname); + g_free(pos->modname); pos->inpa = gaim_input_add(pos->fd, GAIM_INPUT_READ, damn_you, pos); return; } @@ -1573,6 +1526,7 @@ pos->len = len; pos->modname = g_strdup(modname); + /* TODO: Keep track of this return value. */ if (gaim_proxy_connect(pos->gc->account, "gaim.sourceforge.net", 80, straight_to_hell, pos) == NULL) { @@ -1622,7 +1576,7 @@ GaimAccount *account = gaim_connection_get_account(gc); char *host, *separator; int port; - NewFlapConnectionData *new_conn_data; + FlapConnection *newconn; va_list ap; struct aim_redirect_data *redir; @@ -1642,36 +1596,30 @@ gaim_debug_info("oscar", "Connecting to FLAP server %s:%d of type 0x%04hx\n", host, port, redir->group); - new_conn_data = g_new(NewFlapConnectionData, 1); - new_conn_data->gc = gc; - new_conn_data->conn = flap_connection_new(od, redir->group); - new_conn_data->cookielen = redir->cookielen; - new_conn_data->cookie = g_memdup(redir->cookie, redir->cookielen); - if (new_conn_data->conn->type == SNAC_FAMILY_CHAT) + newconn = flap_connection_new(od, redir->group); + newconn->cookielen = redir->cookielen; + newconn->cookie = g_memdup(redir->cookie, redir->cookielen); + if (newconn->type == SNAC_FAMILY_CHAT) { struct chat_connection *cc; cc = g_new0(struct chat_connection, 1); - cc->conn = new_conn_data->conn; + cc->conn = newconn; cc->gc = gc; cc->name = g_strdup(redir->chat.room); cc->exchange = redir->chat.exchange; cc->instance = redir->chat.instance; cc->show = extract_name(redir->chat.room); - new_conn_data->data = cc; + newconn->connect_data = cc; gaim_debug_info("oscar", "Connecting to chat room %s exchange %hu\n", cc->name, cc->exchange); } - else - { - new_conn_data->data = NULL; - } - if (gaim_proxy_connect(account, host, port, connection_established_cb, new_conn_data) == NULL) + newconn->connect_info = gaim_proxy_connect(account, host, port, + connection_established_cb, newconn); + if (newconn->connect_info == NULL) { - flap_connection_schedule_destroy(new_conn_data->conn, - OSCAR_DISCONNECT_COULD_NOT_CONNECT); + flap_connection_schedule_destroy(newconn, OSCAR_DISCONNECT_COULD_NOT_CONNECT); gaim_debug_error("oscar", "Unable to connect to FLAP server " "of type 0x%04hx\n", redir->group); - destroy_new_conn_data(new_conn_data); } g_free(host); Modified: trunk/src/protocols/oscar/oscar.h =================================================================== --- trunk/src/protocols/oscar/oscar.h 2006-08-14 04:43:38 UTC (rev 16742) +++ trunk/src/protocols/oscar/oscar.h 2006-08-14 06:24:17 UTC (rev 16743) @@ -33,6 +33,7 @@ #include "debug.h" #include "eventloop.h" #include "internal.h" +#include "proxy.h" #include <stdio.h> #include <string.h> @@ -366,6 +367,12 @@ guint destroy_timeout; OscarDisconnectReason disconnect_reason; + /* A few variables that are only used when connecting */ + GaimProxyConnectInfo *connect_info; + guint16 cookielen; + guint8 *cookie; + gpointer connect_data; + int fd; FlapFrame buffer_incoming; GaimCircBuffer *buffer_outgoing; @@ -661,6 +668,9 @@ guint32 minmsginterval; /* in milliseconds? */ }; +/* + * TODO: Should probably combine this with struct chat_connection. + */ struct aim_chat_roominfo { guint16 exchange; @@ -668,6 +678,25 @@ guint16 instance; }; +struct chat_connection +{ + char *name; + char *show; /* AOL did something funny to us */ + guint16 exchange; + guint16 instance; + FlapConnection *conn; + int id; + GaimConnection *gc; + GaimConversation *conv; + int maxlen; + int maxvis; +}; + +/* + * All this chat struct stuff should be in family_chat.c + */ +void oscar_chat_destroy(struct chat_connection *cc); + #define AIM_IMFLAGS_AWAY 0x0001 /* mark as an autoreply */ #define AIM_IMFLAGS_ACK 0x0002 /* request a receipt notice */ #define AIM_IMFLAGS_BUDDYREQ 0x0010 /* buddy icon requested */ Modified: trunk/src/protocols/oscar/peer.c =================================================================== --- trunk/src/protocols/oscar/peer.c 2006-08-14 04:43:38 UTC (rev 16742) +++ trunk/src/protocols/oscar/peer.c 2006-08-14 06:24:17 UTC (rev 16743) @@ -482,7 +482,7 @@ * either connected or failed to connect. */ static void -peer_connection_established_cb(gpointer data, gint source) +peer_connection_established_cb(gpointer data, gint source, const gchar *error_message) { PeerConnection *conn; Modified: trunk/src/protocols/oscar/peer.h =================================================================== --- trunk/src/protocols/oscar/peer.h 2006-08-14 04:43:38 UTC (rev 16742) +++ trunk/src/protocols/oscar/peer.h 2006-08-14 06:24:17 UTC (rev 16743) @@ -265,7 +265,7 @@ /* * For peer proxying */ -void peer_proxy_connection_established_cb(gpointer data, gint source); +void peer_proxy_connection_established_cb(gpointer data, gint source, const gchar *error_message); #if 0 int peer_oft_sendheader(OscarData *od, guint16 type, PeerConnection *peer_connection); Modified: trunk/src/protocols/oscar/peer_proxy.c =================================================================== --- trunk/src/protocols/oscar/peer_proxy.c 2006-08-14 04:43:38 UTC (rev 16742) +++ trunk/src/protocols/oscar/peer_proxy.c 2006-08-14 06:24:17 UTC (rev 16743) @@ -326,7 +326,7 @@ * either connected or failed to connect. */ void -peer_proxy_connection_established_cb(gpointer data, gint source) +peer_proxy_connection_established_cb(gpointer data, gint source, const gchar *error_message) { PeerConnection *conn; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |