Changeset b041b52 for protocols/oscar
- 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/oscar
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
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)))
Note: See TracChangeset
for help on using the changeset viewer.