From: Adam F. <mi...@us...> - 2002-01-15 04:07:11
|
Update of /cvsroot/gaim/gaim/src/protocols/oscar In directory usw-pr-cvs1:/tmp/cvs-serv22522 Modified Files: chatnav.c ft.c misc.c oscar.c rxqueue.c util.c Log Message: heh. Index: chatnav.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/chatnav.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- chatnav.c 2001/12/01 00:56:30 1.4 +++ chatnav.c 2002/01/15 04:07:08 1.5 @@ -36,7 +36,17 @@ /* exchange */ aimbs_put16(&fr->data, exchange); - /* action cookie */ + /* + * This looks to be a big hack. You'll note that this entire + * SNAC is just a room info structure, but the hard room name, + * here, is set to "create". + * + * Either this goes on the "list of questions concerning + * why-the-hell-did-you-do-that", or this value is completly + * ignored. Without experimental evidence, but a good knowledge of + * AOL style, I'm going to guess that it is the latter, and that + * the value of the room name in create requests is ignored. + */ aimbs_put8(&fr->data, strlen(ck)); aimbs_putraw(&fr->data, ck, strlen(ck)); Index: ft.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/ft.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- ft.c 2001/12/22 08:11:11 1.12 +++ ft.c 2002/01/15 04:07:08 1.13 @@ -4,6 +4,7 @@ */ #define FAIM_INTERNAL + #ifdef HAVE_CONFIG_H #include <config.h> #endif Index: misc.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/misc.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- misc.c 2001/12/10 00:48:27 1.11 +++ misc.c 2002/01/15 04:07:08 1.12 @@ -30,19 +30,16 @@ { aim_frame_t *fr; aim_snacid_t snacid; - int i, len = 0; + int len = 0; char *localcpy = NULL; char *tmpptr = NULL; if (!buddy_list || !(localcpy = strdup(buddy_list))) return -EINVAL; - i = 0; - tmpptr = strtok(localcpy, "&"); - while ((tmpptr != NULL) && (i < 150)) { - faimdprintf(sess, 2, "---adding %d: %s (%d)\n", i, tmpptr, strlen(tmpptr)); - len += 1+strlen(tmpptr); - i++; + for (tmpptr = strtok(localcpy, "&"); tmpptr; ) { + faimdprintf(sess, 2, "---adding: %s (%d)\n", tmpptr, strlen(tmpptr)); + len += 1 + strlen(tmpptr); tmpptr = strtok(NULL, "&"); } @@ -50,18 +47,16 @@ return -ENOMEM; snacid = aim_cachesnac(sess, 0x0003, 0x0004, 0x0000, NULL, 0); - aim_putsnac(&fr->data, 0x0003, 0x0004, 0x0000, snacid); - strncpy(localcpy, buddy_list, strlen(buddy_list)+1); - i = 0; - tmpptr = strtok(localcpy, "&"); - while ((tmpptr != NULL) & (i < 150)) { - faimdprintf(sess, 2, "---adding %d: %s (%d)\n", i, tmpptr, strlen(tmpptr)); - + strncpy(localcpy, buddy_list, strlen(buddy_list) + 1); + + for (tmpptr = strtok(localcpy, "&"); tmpptr; ) { + + faimdprintf(sess, 2, "---adding: %s (%d)\n", tmpptr, strlen(tmpptr)); + aimbs_put8(&fr->data, strlen(tmpptr)); aimbs_putraw(&fr->data, tmpptr, strlen(tmpptr)); - i++; tmpptr = strtok(NULL, "&"); } Index: oscar.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/oscar.c,v retrieving revision 1.90 retrieving revision 1.91 diff -u -d -r1.90 -r1.91 --- oscar.c 2002/01/01 09:49:04 1.90 +++ oscar.c 2002/01/15 04:07:08 1.91 @@ -1776,7 +1776,7 @@ debug_printf("chat info: \tMax Concurrent Rooms: %d\n", maxrooms); debug_printf("chat info: \tExchange List: (%d total)\n", exchangecount); for (i = 0; i < exchangecount; i++) - debug_printf("chat info: \t\t%d\n", exchanges[i].number); + debug_printf("chat info: \t\t%d %s\n", exchanges[i].number, exchanges[i].name ? exchanges[i].name : ""); while (odata->create_rooms) { struct create_room *cr = odata->create_rooms->data; debug_printf("creating room %s\n", cr->name); Index: rxqueue.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/rxqueue.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- rxqueue.c 2001/11/28 05:30:13 1.5 +++ rxqueue.c 2002/01/15 04:07:08 1.6 @@ -431,8 +431,7 @@ /* read the payload */ if (aim_bstream_recv(&newrx->data, conn->fd, payloadlen) < payloadlen) { - free(payload); - aim_frame_destroy(newrx); + aim_frame_destroy(newrx); /* free's payload */ aim_conn_close(conn); return -1; } Index: util.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/util.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- util.c 2001/11/05 02:05:06 1.3 +++ util.c 2002/01/15 04:07:08 1.4 @@ -162,6 +162,10 @@ } } + /* Should both be NULL */ + if (*curPtr1 != *curPtr2) + return 1; + return 0; } |