- Timestamp:
- 2011-12-06T21:50:43Z (13 years ago)
- Branches:
- master
- Children:
- aee8c19
- Parents:
- df98ee8 (diff), d7edadf (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- protocols
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/msn/sb.c
rdf98ee8 rb041b52 308 308 struct msn_switchboard *sb = data; 309 309 struct im_connection *ic; 310 struct msn_data *md;311 310 char buf[1024]; 312 311 … … 316 315 317 316 ic = sb->ic; 318 md = ic->proto_data;319 317 320 318 if( source != sb->fd ) … … 675 673 struct im_connection *ic = sb->ic; 676 674 char *body; 677 int blen = 0;678 675 679 676 if( !num_parts ) … … 681 678 682 679 if( ( body = strstr( msg, "\r\n\r\n" ) ) ) 683 {684 680 body += 4; 685 blen = msglen - ( body - msg );686 }687 681 688 682 if( strcmp( cmd[0], "MSG" ) == 0 ) -
protocols/msn/soap.c
rdf98ee8 rb041b52 210 210 { 211 211 char *s; 212 int st;213 212 214 213 if( !getenv( "BITLBEE_DEBUG" ) ) … … 218 217 { 219 218 if( ( s = strstr( headers, "\r\n\r\n" ) ) ) 220 st =write( 2, headers, s - headers + 4 );219 write( 2, headers, s - headers + 4 ); 221 220 else 222 st =write( 2, headers, strlen( headers ) );221 write( 2, headers, strlen( headers ) ); 223 222 } 224 223 -
protocols/oscar/chat.c
rdf98ee8 rb041b52 384 384 char *roomname = NULL; 385 385 struct aim_chat_roominfo roominfo; 386 guint16 tlvcount = 0;387 386 aim_tlvlist_t *tlvlist; 388 387 char *roomdesc = NULL; … … 401 400 } 402 401 403 tlvcount = aimbs_get16(bs);402 aimbs_get16(bs); /* tlv count */ 404 403 405 404 /* -
protocols/oscar/chatnav.c
rdf98ee8 rb041b52 139 139 * Type 0x0002: Unknown 140 140 */ 141 if (aim_gettlv(innerlist, 0x0002, 1)) { 142 guint16 classperms; 143 144 classperms = aim_gettlv16(innerlist, 0x0002, 1); 145 146 } 141 if (aim_gettlv(innerlist, 0x0002, 1)) 142 ; 147 143 148 144 /* … … 205 201 */ 206 202 if (aim_gettlv(innerlist, 0x00d5, 1)) { 207 guint8 createperms; 208 209 createperms = aim_gettlv8(innerlist, 0x00d5, 1); 203 aim_gettlv8(innerlist, 0x00d5, 1); /* createperms */ 210 204 } 211 205 -
protocols/oscar/icq.c
rdf98ee8 rb041b52 235 235 aim_tlv_t *datatlv; 236 236 aim_bstream_t qbs; 237 guint32 ouruin; 238 guint16 cmdlen, cmd, reqid; 237 guint16 cmd, reqid; 239 238 240 239 if (!(tl = aim_readtlvchain(bs)) || !(datatlv = aim_gettlv(tl, 0x0001, 1))) { … … 246 245 aim_bstream_init(&qbs, datatlv->value, datatlv->length); 247 246 248 cmdlen = aimbs_getle16(&qbs);249 ouruin = aimbs_getle32(&qbs);247 aimbs_getle16(&qbs); /* cmdlen */ 248 aimbs_getle32(&qbs); /* ouruin */ 250 249 cmd = aimbs_getle16(&qbs); 251 250 reqid = aimbs_getle16(&qbs); -
protocols/oscar/im.c
rdf98ee8 rb041b52 919 919 int i, ret = 0; 920 920 aim_rxcallback_t userfunc; 921 guint8 cookie[8];922 921 guint16 channel; 923 922 aim_tlvlist_t *tlvlist; … … 931 930 /* ICBM Cookie. */ 932 931 for (i = 0; i < 8; i++) 933 cookie[i] =aimbs_get8(bs);932 aimbs_get8(bs); 934 933 935 934 /* Channel ID */ … … 1414 1413 { 1415 1414 guint16 hdrlen, msglen, dc; 1416 guint8 msgtype , msgflags;1415 guint8 msgtype; 1417 1416 guint8 *plugin; 1418 1417 int i = 0, tmp = 0; … … 1442 1441 1443 1442 msgtype = aimbs_getle8(servdata); 1444 msgflags = aimbs_getle8(servdata);1443 aimbs_getle8(servdata); /* msgflags */ 1445 1444 1446 1445 aim_bstream_advance(servdata, 0x04); /* status code and priority code */ -
protocols/oscar/misc.c
rdf98ee8 rb041b52 310 310 { 311 311 aim_frame_t *fr; 312 aim_snacid_t snacid;313 312 aim_tlvlist_t *tl = NULL; 314 313 … … 330 329 return -ENOMEM; 331 330 332 snacid =aim_cachesnac(sess, 0x0002, 0x000f, 0x0000, NULL, 0);331 aim_cachesnac(sess, 0x0002, 0x000f, 0x0000, NULL, 0); 333 332 334 333 aim_putsnac(&fr->data, 0x0002, 0x000f, 0x0000, 0); -
protocols/oscar/oscar.c
rdf98ee8 rb041b52 1072 1072 static void gaim_icq_authgrant(void *data_) { 1073 1073 struct icq_auth *data = data_; 1074 char *uin , message;1074 char *uin; 1075 1075 struct oscar_data *od = (struct oscar_data *)data->ic->proto_data; 1076 1076 1077 1077 uin = g_strdup_printf("%u", data->uin); 1078 message = 0;1079 1078 aim_ssi_auth_reply(od->sess, od->conn, uin, 1, ""); 1079 // char *message = 0; 1080 1080 // aim_send_im_ch4(od->sess, uin, AIM_ICQMSG_AUTHGRANTED, &message); 1081 1081 imcb_ask_add(data->ic, uin, NULL); … … 1219 1219 static int gaim_parse_misses(aim_session_t *sess, aim_frame_t *fr, ...) { 1220 1220 va_list ap; 1221 guint16 chan,nummissed, reason;1221 guint16 nummissed, reason; 1222 1222 aim_userinfo_t *userinfo; 1223 1223 1224 1224 va_start(ap, fr); 1225 chan = (guint16)va_arg(ap, unsigned int);1225 va_arg(ap, unsigned int); /* chan */ 1226 1226 userinfo = va_arg(ap, aim_userinfo_t *); 1227 1227 nummissed = (guint16)va_arg(ap, unsigned int); … … 1335 1335 1336 1336 static int gaim_parse_motd(aim_session_t *sess, aim_frame_t *fr, ...) { 1337 char *msg;1338 1337 guint16 id; 1339 1338 va_list ap; … … 1341 1340 va_start(ap, fr); 1342 1341 id = (guint16)va_arg(ap, unsigned int); 1343 msg = va_arg(ap, char *);1342 va_arg(ap, char *); /* msg */ 1344 1343 va_end(ap); 1345 1344 … … 1361 1360 switch(type) { 1362 1361 case 0x0002: { 1363 guint8 maxrooms; 1364 struct aim_chat_exchangeinfo *exchanges; 1365 int exchangecount; // i; 1366 1367 maxrooms = (guint8)va_arg(ap, unsigned int); 1368 exchangecount = va_arg(ap, int); 1369 exchanges = va_arg(ap, struct aim_chat_exchangeinfo *); 1362 va_arg(ap, unsigned int); /* maxrooms */ 1363 va_arg(ap, int); /* exchangecount */ 1364 va_arg(ap, struct aim_chat_exchangeinfo *); /* exchanges */ 1370 1365 va_end(ap); 1371 1366 … … 1380 1375 break; 1381 1376 case 0x0008: { 1382 char *fqcn, *name, *ck; 1383 guint16 instance, flags, maxmsglen, maxoccupancy, unknown, exchange; 1384 guint8 createperms; 1385 guint32 createtime; 1386 1387 fqcn = va_arg(ap, char *); 1377 char *ck; 1378 guint16 instance, exchange; 1379 1380 va_arg(ap, char *); /* fqcn */ 1388 1381 instance = (guint16)va_arg(ap, unsigned int); 1389 1382 exchange = (guint16)va_arg(ap, unsigned int); 1390 flags = (guint16)va_arg(ap, unsigned int);1391 createtime = va_arg(ap, guint32);1392 maxmsglen = (guint16)va_arg(ap, unsigned int);1393 maxoccupancy = (guint16)va_arg(ap, unsigned int);1394 createperms = (guint8)va_arg(ap, int);1395 unknown = (guint16)va_arg(ap, unsigned int);1396 name = va_arg(ap, char *);1383 va_arg(ap, unsigned int); /* flags */ 1384 va_arg(ap, guint32); /* createtime */ 1385 va_arg(ap, unsigned int); /* maxmsglen */ 1386 va_arg(ap, unsigned int); /* maxoccupancy */ 1387 va_arg(ap, int); /* createperms */ 1388 va_arg(ap, unsigned int); /* unknown */ 1389 va_arg(ap, char *); /* name */ 1397 1390 ck = va_arg(ap, char *); 1398 1391 va_end(ap); … … 1456 1449 static int gaim_chat_info_update(aim_session_t *sess, aim_frame_t *fr, ...) { 1457 1450 va_list ap; 1458 aim_userinfo_t *userinfo; 1459 struct aim_chat_roominfo *roominfo; 1460 char *roomname; 1461 int usercount; 1462 char *roomdesc; 1463 guint16 unknown_c9, unknown_d2, unknown_d5, maxmsglen, maxvisiblemsglen; 1464 guint32 creationtime; 1451 guint16 maxmsglen, maxvisiblemsglen; 1465 1452 struct im_connection *ic = sess->aux_data; 1466 1453 struct chat_connection *ccon = find_oscar_chat_by_conn(ic, fr->conn); 1467 1454 1468 1455 va_start(ap, fr); 1469 roominfo = va_arg(ap, struct aim_chat_roominfo *);1470 roomname = va_arg(ap, char *);1471 usercount= va_arg(ap, int);1472 userinfo = va_arg(ap, aim_userinfo_t *);1473 roomdesc = va_arg(ap, char *);1474 unknown_c9 = (guint16)va_arg(ap, int);1475 creationtime = (guint32)va_arg(ap, unsigned long);1456 va_arg(ap, struct aim_chat_roominfo *); /* roominfo */ 1457 va_arg(ap, char *); /* roomname */ 1458 va_arg(ap, int); /* usercount */ 1459 va_arg(ap, aim_userinfo_t *); /* userinfo */ 1460 va_arg(ap, char *); /* roomdesc */ 1461 va_arg(ap, int); /* unknown_c9 */ 1462 va_arg(ap, unsigned long); /* creationtime */ 1476 1463 maxmsglen = (guint16)va_arg(ap, int); 1477 unknown_d2 = (guint16)va_arg(ap, int);1478 unknown_d5 = (guint16)va_arg(ap, int);1464 va_arg(ap, int); /* unknown_d2 */ 1465 va_arg(ap, int); /* unknown_d5 */ 1479 1466 maxvisiblemsglen = (guint16)va_arg(ap, int); 1480 1467 va_end(ap); … … 1517 1504 #endif 1518 1505 va_list ap; 1519 guint16 code , rateclass;1520 guint32 windowsize, clear, alert, limit, disconnect, currentavg, maxavg;1506 guint16 code; 1507 guint32 windowsize, clear, currentavg; 1521 1508 1522 1509 va_start(ap, fr); 1523 1510 code = (guint16)va_arg(ap, unsigned int); 1524 rateclass= (guint16)va_arg(ap, unsigned int);1511 va_arg(ap, unsigned int); /* rateclass */ 1525 1512 windowsize = (guint32)va_arg(ap, unsigned long); 1526 1513 clear = (guint32)va_arg(ap, unsigned long); 1527 alert = (guint32)va_arg(ap, unsigned long);1528 limit = (guint32)va_arg(ap, unsigned long);1529 disconnect = (guint32)va_arg(ap, unsigned long);1514 va_arg(ap, unsigned long); /* alert */ 1515 va_arg(ap, unsigned long); /* limit */ 1516 va_arg(ap, unsigned long); /* disconnect */ 1530 1517 currentavg = (guint32)va_arg(ap, unsigned long); 1531 maxavg = (guint32)va_arg(ap, unsigned long);1518 va_arg(ap, unsigned long); /* maxavg */ 1532 1519 va_end(ap); 1533 1520 … … 2417 2404 struct im_connection * ic = sess->aux_data; 2418 2405 va_list ap; 2419 guint16 type 1, type2;2406 guint16 type2; 2420 2407 char * sn; 2421 2408 2422 2409 va_start(ap, fr); 2423 type1 = va_arg(ap, int);2410 va_arg(ap, int); /* type1 */ 2424 2411 sn = va_arg(ap, char*); 2425 2412 type2 = va_arg(ap, int); … … 2541 2528 2542 2529 if((cur = aim_getconn_type(od->sess, AIM_CONN_TYPE_CHATNAV))) { 2543 int st; 2544 2545 st = aim_chatnav_createroom(od->sess, cur, room, exchange_number); 2530 aim_chatnav_createroom(od->sess, cur, room, exchange_number); 2546 2531 2547 2532 return ret; … … 2570 2555 static int chat_id = 0; 2571 2556 char * chatname, *s; 2572 struct groupchat *c;2573 2557 2574 2558 chatname = g_strdup_printf("%s%s%d", isdigit(*ic->acc->user) ? "icq" : "", … … 2579 2563 *s = '0'; 2580 2564 2581 c = imcb_chat_new(ic, chatname);2582 2565 ret = oscar_chat_join_internal(ic, chatname, NULL, NULL, 4); 2583 2566 aim_chat_invite(od->sess, od->conn, who, "", 4, chatname, 0x0); … … 2585 2568 g_free(chatname); 2586 2569 2587 return NULL;2570 return ret; 2588 2571 } 2589 2572 -
protocols/oscar/rxqueue.c
rdf98ee8 rb041b52 388 388 */ 389 389 if (aimbs_get8(&flaphdr) != 0x2a) { 390 guint8 start;391 392 390 aim_bstream_rewind(&flaphdr); 393 start =aimbs_get8(&flaphdr);391 aimbs_get8(&flaphdr); 394 392 imcb_error(sess->aux_data, "FLAP framing disrupted"); 395 393 aim_conn_close(conn); -
protocols/oscar/service.c
rdf98ee8 rb041b52 563 563 groupcount = aimbs_get16(bs); 564 564 for (i = 0; i < groupcount; i++) { 565 guint16 group; 566 567 group = aimbs_get16(bs); 565 aimbs_get16(bs); 568 566 569 567 imcb_error(sess->aux_data, "bifurcated migration unsupported"); … … 701 699 static int hostversions(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs) 702 700 { 703 int vercount;704 701 guint8 *versions; 705 702 706 703 /* This is frivolous. (Thank you SmarterChild.) */ 707 vercount = aim_bstream_empty(bs)/4;704 aim_bstream_empty(bs); /* == vercount * 4 */ 708 705 versions = aimbs_getraw(bs, aim_bstream_empty(bs)); 709 706 g_free(versions); … … 731 728 aim_tlvlist_t *tl = NULL; 732 729 guint32 data; 733 int tlvlen;734 730 struct im_connection *ic = sess ? sess->aux_data : NULL; 735 731 … … 739 735 data |= AIM_ICQ_STATE_WEBAWARE; 740 736 741 tlvlen = aim_addtlvtochain32(&tl, 0x0006, data);737 aim_addtlvtochain32(&tl, 0x0006, data); /* tlvlen */ 742 738 743 739 if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10 + 8))) -
protocols/yahoo/libyahoo2.c
rdf98ee8 rb041b52 1809 1809 struct yahoo_input_data *yid = had->yid; 1810 1810 struct yahoo_data *yd = yid->yd; 1811 struct http_request *req;1812 1811 char *login, *passwd, *chal; 1813 1812 char *url; … … 1823 1822 (int) time(NULL), login, passwd, chal); 1824 1823 1825 req =http_dorequest_url(url, yahoo_https_auth_token_finish, had);1824 http_dorequest_url(url, yahoo_https_auth_token_finish, had); 1826 1825 1827 1826 g_free(url); … … 1870 1869 static void yahoo_https_auth_init(struct yahoo_https_auth_data *had) 1871 1870 { 1872 struct http_request *req;1873 1871 char *url; 1874 1872 … … 1876 1874 (int) time(NULL), had->token); 1877 1875 1878 req =http_dorequest_url(url, yahoo_https_auth_finish, had);1876 http_dorequest_url(url, yahoo_https_auth_finish, had); 1879 1877 1880 1878 g_free(url); … … 1990 1988 { 1991 1989 struct yahoo_data *yd = yid->yd; 1992 char *login_id;1993 char *handle;1994 1990 char *url = NULL; 1995 1991 int login_status = -1; … … 2000 1996 struct yahoo_pair *pair = l->data; 2001 1997 if (pair->key == 0) 2002 login_id = pair->value;1998 ; /* login_id */ 2003 1999 else if (pair->key == 1) 2004 handle = pair->value;2000 ; /* handle */ 2005 2001 else if (pair->key == 20) 2006 2002 url = pair->value; … … 2089 2085 char *msg = NULL; 2090 2086 char *name = NULL; 2091 long tm = 0L;2092 2087 int state = YAHOO_STATUS_AVAILABLE; 2093 int online = 0;2094 2088 int away = 0; 2095 2089 int idle = 0; … … 2111 2105 state = strtol(pair->value, NULL, 10); 2112 2106 else if (pair->key == 15) 2113 tm = strtol(pair->value, NULL, 10);2107 ; /* tm */ 2114 2108 else if (pair->key == 13) 2115 online = strtol(pair->value, NULL, 10);2109 ; /* online */ 2116 2110 else if (pair->key == 47) 2117 2111 away = strtol(pair->value, NULL, 10); … … 2140 2134 char *where = NULL; 2141 2135 int status = 0; 2142 char *me = NULL;2143 2136 2144 2137 struct yahoo_buddy *bud = NULL; … … 2148 2141 struct yahoo_pair *pair = l->data; 2149 2142 if (pair->key == 1) 2150 me = pair->value;2143 ; /* Me... don't care */ 2151 2144 if (pair->key == 7) 2152 2145 who = pair->value; … … 2204 2197 char *who = NULL; 2205 2198 char *where = NULL; 2206 int unk_66 = 0;2207 char *me = NULL;2208 2199 struct yahoo_buddy *bud; 2209 2200 … … 2214 2205 struct yahoo_pair *pair = l->data; 2215 2206 if (pair->key == 1) 2216 me = pair->value;2207 ; /* Me... don't care */ 2217 2208 else if (pair->key == 7) 2218 2209 who = pair->value; … … 2220 2211 where = pair->value; 2221 2212 else if (pair->key == 66) 2222 unk_66 = strtol(pair->value, NULL, 10);2213 ; /* unk_66 */ 2223 2214 else 2224 2215 DEBUG_MSG(("unknown key: %d = %s", pair->key, … … 2256 2247 struct yahoo_packet *pkt) 2257 2248 { 2258 char *who = NULL;2259 int status = 0;2260 char *me = NULL;2261 int un_ignore = 0;2262 2263 2249 YList *l; 2264 2250 for (l = pkt->hash; l; l = l->next) { 2265 2251 struct yahoo_pair *pair = l->data; 2266 2252 if (pair->key == 0) 2267 who = pair->value;2253 ; /* who */ 2268 2254 if (pair->key == 1) 2269 me = pair->value;2255 ; /* Me... don't care */ 2270 2256 if (pair->key == 13) /* 1 == ignore, 2 == unignore */ 2271 un_ignore = strtol(pair->value, NULL, 10);2257 ; 2272 2258 if (pair->key == 66) 2273 status = strtol(pair->value, NULL, 10);2259 ; /* status */ 2274 2260 } 2275 2261 … … 2293 2279 char *me = NULL; 2294 2280 char *room = NULL; 2295 char *voice_room = NULL;2296 2281 2297 2282 YList *l; … … 2303 2288 me = pair->value; 2304 2289 if (pair->key == 13) 2305 voice_room = pair->value;2290 ; /* voice room */ 2306 2291 if (pair->key == 57) 2307 2292 room = pair->value; … … 2438 2423 struct yahoo_packet *pkt) 2439 2424 { 2440 char *me = NULL;2441 2425 char *key = NULL; 2442 2426 char *who = NULL; … … 2447 2431 struct yahoo_pair *pair = l->data; 2448 2432 if (pair->key == 5) 2449 me = pair->value;2433 ; /* me */ 2450 2434 if (pair->key == 61) 2451 2435 key = pair->value; … … 3369 3353 struct yahoo_webcam *wcm = y->wcm; 3370 3354 struct yahoo_input_data *yid; 3371 struct yahoo_server_settings *yss;3372 3355 3373 3356 if (!wcm || !wcm->server || !wcm->key) … … 3381 3364 yid->wcm = y->wcm; 3382 3365 y->wcm = NULL; 3383 3384 yss = y->yd->server_settings;3385 3366 3386 3367 yid->wcd = y_new0(struct yahoo_webcam_data, 1); … … 4975 4956 YList *l; 4976 4957 struct send_file_data *sfd; 4977 char *who = NULL;4978 char *filename = NULL;4979 4958 char *id = NULL; 4980 4959 char *token = NULL; … … 4984 4963 switch (pair->key) { 4985 4964 case 4: 4986 who = pair->value;4965 /* who */ 4987 4966 break; 4988 4967 case 5: … … 4998 4977 break; 4999 4978 case 27: 5000 filename = pair->value;4979 /* filename */ 5001 4980 break; 5002 4981 } … … 5023 5002 { 5024 5003 YList *l; 5025 char *who = NULL;5026 char *filename = NULL;5027 5004 char *id = NULL; 5028 5005 char *token = NULL; … … 5036 5013 case 1: 5037 5014 case 4: 5038 who = pair->value;5015 /* who */ 5039 5016 break; 5040 5017 case 5: … … 5053 5030 break; 5054 5031 case 27: 5055 filename = pair->value;5032 /* filename */ 5056 5033 break; 5057 5034 }
Note: See TracChangeset
for help on using the changeset viewer.