- Timestamp:
- Jan 12, 2013, 1:43:31 PM (12 years ago)
- Parents:
- 4626016 (diff), 7869e48 (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
aim.c
rf271129 r7869e48 107 107 * future. It's still called by Owl. 108 108 */ 109 109 110 110 } 111 111 … … 131 131 aim_setdebuggingcb(sess, faimtest_debugcb); 132 132 aim_tx_setenqueue(sess, AIM_TX_IMMEDIATE, NULL); 133 133 134 134 /* this will leak, I know and just don't care right now */ 135 135 priv=g_new0(struct owlfaim_priv, 1); … … 165 165 */ 166 166 167 167 168 168 aim_conn_addhandler(sess, conn, AIM_CB_FAM_SPECIAL, AIM_CB_SPECIAL_FLAPVER, faimtest_flapversion, 0); 169 169 aim_conn_addhandler(sess, conn, AIM_CB_FAM_SPECIAL, AIM_CB_SPECIAL_CONNCOMPLETE, faimtest_conncomplete, 0); … … 174 174 /* aim_conn_addhandler(sess, conn, 0x0017, 0x0007, gaim_parse_login, 0); */ 175 175 /* aim_conn_addhandler(sess, conn, 0x0017, 0x0003, gaim_parse_auth_resp, 0); */ 176 176 177 177 /* start processing AIM events */ 178 178 owl_global_set_doaimevents(&g); … … 338 338 339 339 owl_function_debugmsg("owl_aim_search: doing search for %s", email); 340 ret=aim_search_address(owl_global_get_aimsess(&g), 340 ret=aim_search_address(owl_global_get_aimsess(&g), 341 341 aim_getconn_type(owl_global_get_aimsess(&g), AIM_CONN_TYPE_BOS), 342 342 email); … … 358 358 len=499; 359 359 } 360 360 361 361 aim_locate_setprofile(owl_global_get_aimsess(&g), 362 362 NULL, NULL, 0, … … 367 367 aim_bos_setprofile(owl_global_get_aimsess(&g), 368 368 owl_global_get_bosconn(&g), 369 NULL, NULL, 0, "us-ascii", msg, 369 NULL, NULL, 0, "us-ascii", msg, 370 370 strlen(msg), 0); 371 371 */ … … 421 421 aim_getconn_type(owl_global_get_aimsess(&g), AIM_CONN_TYPE_CHATNAV), name, exchange); 422 422 ret=aim_chat_join(owl_global_get_aimsess(&g), owl_global_get_bosconn(&g), exchange, name, 0x0000); 423 423 424 424 } 425 425 … … 468 468 if (selstat == -1) { 469 469 owl_aim_logged_out(); 470 } else if (selstat == 0) { 470 } else if (selstat == 0) { 471 471 /* no events pending */ 472 472 } else if (selstat == 1) { /* outgoing data pending */ … … 474 474 } else if (selstat == 2) { /* incoming data pending */ 475 475 /* printf("selstat == 2\n"); */ 476 476 477 477 if (aim_get_command(aimsess, waitingconn) >= 0) { 478 478 aim_rxdispatch(aimsess); … … 510 510 struct owlfaim_priv *priv = sess->aux_data; 511 511 struct client_info_s info = CLIENTINFO_AIM_KNOWNGOOD; 512 512 513 513 const char *key; 514 514 va_list ap; … … 519 519 520 520 aim_send_login(sess, fr->conn, priv->screenname, priv->password, &info, key); 521 521 522 522 return(1); 523 523 } … … 649 649 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_LOK, 0x0003, faimtest_parse_searchreply, 0); 650 650 */ 651 651 652 652 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_MSG, AIM_CB_MSG_ERROR, faimtest_parse_msgerr, 0); 653 653 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_LOC, AIM_CB_LOC_USERINFO, faimtest_parse_userinfo, 0); … … 733 733 fu16_t code; 734 734 const char *msg; 735 735 736 736 va_start(ap, fr); 737 737 code = va_arg(ap, int); 738 738 msg = va_arg(ap, const char *); 739 739 va_end(ap); 740 740 741 741 owl_function_error("faimtest_parse_connerr: Code 0x%04x: %s\n", code, msg); 742 742 aim_conn_kill(sess, &fr->conn); /* this will break the main loop */ 743 743 744 744 priv->connected = 0; 745 745 746 746 return 1; 747 747 } … … 751 751 int status; 752 752 va_list ap; 753 753 754 754 va_start(ap, fr); 755 755 status = va_arg(ap, int); /* status code of confirmation request */ … … 758 758 /* owl_function_debugmsg("faimtest_accountconfirm: Code 0x%04x: %s\n", code, msg); */ 759 759 owl_function_debugmsg("faimtest_accountconfirm: account confirmation returned status 0x%04x (%s)\n", status, (status==0x0000)?"email sent":"unknown"); 760 760 761 761 return 1; 762 762 } … … 768 768 const char *val; 769 769 va_list ap; 770 770 771 771 va_start(ap, fr); 772 772 change = va_arg(ap, int); … … 777 777 str = va_arg(ap, int); 778 778 va_end(ap); 779 779 780 780 owl_function_debugmsg("faimtest_infochange: info%s: perms = %d, type = %x, length = %d, val = %s", change?" change":"", perms, type, length, str?val:"(not string)"); 781 781 782 782 return(1); 783 783 } … … 790 790 791 791 owl_function_debugmsg("faimtest_handledirect:"); 792 792 793 793 va_start(ap, fr); 794 794 redir = va_arg(ap, struct aim_redirect_data *); 795 795 796 796 if (redir->group == 0x0005) { /* Adverts */ 797 797 798 798 } else if (redir->group == 0x0007) { /* Authorizer */ 799 799 aim_conn_t *tstconn; 800 800 801 801 owl_function_debugmsg("faimtest_handledirect: autorizer"); 802 802 803 803 tstconn = aim_newconn(sess, AIM_CONN_TYPE_AUTH, redir->ip); 804 804 if (!tstconn || (tstconn->status & AIM_CONN_STATUS_RESOLVERR)) { … … 832 832 struct aim_icbmparameters *params; 833 833 va_list ap; 834 834 835 835 va_start(ap, fr); 836 836 params = va_arg(ap, struct aim_icbmparameters *); 837 837 va_end(ap); 838 838 839 839 owl_function_debugmsg("faimtest_icbmparaminfo: ICBM Parameters: maxchannel = %d, default flags = 0x%08x, max msg len = %d, max sender evil = %f, max reciever evil = %f, min msg interval = %u", 840 840 params->maxchan, params->flags, params->maxmsglen, ((float)params->maxsenderwarn)/10.0, ((float)params->maxrecverwarn)/10.0, params->minmsginterval); 841 841 842 842 /* 843 843 * Set these to your taste, or client medium. Setting minmsginterval … … 850 850 /* aim_seticbmparam(sess, params); */ 851 851 aim_im_setparams(sess, params); 852 852 853 853 return 1; 854 854 } … … 858 858 va_list ap; 859 859 fu16_t maxbuddies, maxwatchers; 860 860 861 861 va_start(ap, fr); 862 862 maxbuddies = va_arg(ap, int); 863 863 maxwatchers = va_arg(ap, int); 864 864 va_end(ap); 865 865 866 866 owl_function_debugmsg("faimtest_parse_buddyrights: Max buddies = %d / Max watchers = %d\n", maxbuddies, maxwatchers); 867 867 868 868 /* aim_ssi_reqrights(sess, fr->conn); */ 869 869 aim_ssi_reqrights(sess); 870 870 871 871 return 1; 872 872 } … … 876 876 va_list ap; 877 877 fu16_t maxpermits, maxdenies; 878 878 879 879 va_start(ap, fr); 880 880 maxpermits = va_arg(ap, int); 881 881 maxdenies = va_arg(ap, int); 882 882 va_end(ap); 883 883 884 884 owl_function_debugmsg("faimtest_bosrights: Max permit = %d / Max deny = %d\n", maxpermits, maxdenies); 885 885 aim_clientready(sess, fr->conn); … … 893 893 va_list ap; 894 894 fu16_t maxsiglen; 895 895 896 896 va_start(ap, fr); 897 897 maxsiglen = va_arg(ap, int); … … 899 899 900 900 owl_function_debugmsg("faimtest_locrights: rights: max signature length = %d\n", maxsiglen); 901 901 902 902 return(1); 903 903 } … … 944 944 945 945 owl_function_debugmsg("faimtest_parse_motd: %s (%d / %s)\n", msg?msg:"nomsg", id, (id < codeslen)?codes[id]:"unknown"); 946 946 947 947 return 1; 948 948 } … … 960 960 if (flags & AIM_FLAG_WIRELESS) printf("WIRELESS "); 961 961 if (flags & AIM_FLAG_ACTIVEBUDDY) printf("ACTIVEBUDDY "); 962 962 963 963 return; 964 964 } … … 1073 1073 static int faimtest_parse_incoming_im_chan2(aim_session_t *sess, aim_conn_t *conn, aim_userinfo_t *userinfo, struct aim_incomingim_ch2_args *args) 1074 1074 { 1075 /* 1075 /* 1076 1076 printf("rendezvous: source sn = %s\n", userinfo->sn); 1077 1077 printf("rendezvous: \twarnlevel = %f\n", aim_userinfo_warnlevel(userinfo)); … … 1079 1079 printuserflags(userinfo->flags); 1080 1080 printf("\n"); 1081 1081 1082 1082 printf("rendezvous: \tonlinesince = %lu\n", userinfo->onlinesince); 1083 1083 printf("rendezvous: \tidletime = 0x%04x\n", userinfo->idletime); 1084 1084 1085 1085 printf("rendezvous: message/description = %s\n", args->msg); 1086 1086 printf("rendezvous: encoding = %s\n", args->encoding); 1087 1087 printf("rendezvous: language = %s\n", args->language); 1088 1088 */ 1089 1089 1090 1090 if (args->reqclass == AIM_CAPS_SENDFILE) { 1091 1091 owl_function_debugmsg("faimtest_parse_incoming_im_chan2: send file!"); … … 1119 1119 va_list ap; 1120 1120 int ret = 0; 1121 1121 1122 1122 va_start(ap, fr); 1123 1123 channel = (fu16_t)va_arg(ap, unsigned int); 1124 1124 userinfo = va_arg(ap, aim_userinfo_t *); 1125 1125 1126 1126 if (channel == 1) { 1127 1127 struct aim_incomingim_ch1_args *args; … … 1151 1151 1152 1152 nz_screenname=owl_aim_normalize_screenname(userinfo->sn); 1153 1153 1154 1154 owl_buddylist_oncoming(owl_global_get_buddylist(&g), nz_screenname); 1155 1155 … … 1173 1173 owl_function_debugmsg("parse_oncoming sn: %s away flag!", userinfo->sn); 1174 1174 } 1175 1175 1176 1176 owl_function_debugmsg("parse_oncoming sn: %s idle: %i", userinfo->sn, userinfo->idletime); 1177 1177 1178 1178 g_free(nz_screenname); 1179 1179 1180 1180 /* 1181 1181 printf("%ld %s is now online (flags: %04x = %s%s%s%s%s%s%s%s) (caps = %s = 0x%08lx)\n", … … 1201 1201 char *nz_screenname; 1202 1202 va_list ap; 1203 1203 1204 1204 va_start(ap, fr); 1205 1205 userinfo = va_arg(ap, aim_userinfo_t *); … … 1229 1229 userinfo->capabilities); 1230 1230 */ 1231 1231 1232 1232 return 1; 1233 1233 } … … 1238 1238 va_list ap; 1239 1239 fu16_t reason; 1240 1240 1241 1241 va_start(ap, fr); 1242 1242 reason = (fu16_t)va_arg(ap, unsigned int); 1243 1243 va_end(ap); 1244 1244 1245 1245 /* printf("snac threw error (reason 0x%04x: %s)\n", reason, (reason<msgerrreasonslen)?msgerrreasons[reason]:"unknown"); */ 1246 1246 if (reason<msgerrreasonslen) owl_function_error("%s", msgerrreasons[reason]); 1247 1247 1248 1248 return 1; 1249 1249 } … … 1254 1254 const char *destsn; 1255 1255 fu16_t reason; 1256 1256 1257 1257 va_start(ap, fr); 1258 1258 reason = (fu16_t)va_arg(ap, unsigned int); 1259 1259 destsn = va_arg(ap, const char *); 1260 1260 va_end(ap); 1261 1261 1262 1262 /* printf("message to %s bounced (reason 0x%04x: %s)\n", destsn, reason, (reason<msgerrreasonslen)?msgerrreasons[reason]:"unknown"); */ 1263 1263 if (reason<msgerrreasonslen) owl_function_error("%s", msgerrreasons[reason]); … … 1266 1266 owl_function_adminmsg("", "Could not send AIM message, user not logged on"); 1267 1267 } 1268 1268 1269 1269 return 1; 1270 1270 } … … 1275 1275 const char *destsn; 1276 1276 fu16_t reason; 1277 1277 1278 1278 va_start(ap, fr); 1279 1279 reason = (fu16_t)va_arg(ap, unsigned int); 1280 1280 destsn = va_arg(ap, const char *); 1281 1281 va_end(ap); 1282 1282 1283 1283 /* printf("user information for %s unavailable (reason 0x%04x: %s)\n", destsn, reason, (reason<msgerrreasonslen)?msgerrreasons[reason]:"unknown"); */ 1284 1284 if (reason<msgerrreasonslen) owl_function_error("%s", msgerrreasons[reason]); 1285 1285 1286 1286 return 1; 1287 1287 } … … 1297 1297 }; 1298 1298 static int missedreasonslen = 5; 1299 1299 1300 1300 va_list ap; 1301 1301 fu16_t chan, nummissed, reason; 1302 1302 aim_userinfo_t *userinfo; 1303 1303 1304 1304 va_start(ap, fr); 1305 1305 chan = (fu16_t)va_arg(ap, unsigned int); … … 1308 1308 reason = (fu16_t)va_arg(ap, unsigned int); 1309 1309 va_end(ap); 1310 1310 1311 1311 owl_function_debugmsg("faimtest_parse_misses: missed %d messages from %s on channel %d (reason %d: %s)\n", nummissed, userinfo->sn, chan, reason, (reason<missedreasonslen)?missedreasons[reason]:"unknown"); 1312 1312 1313 1313 return 1; 1314 1314 } … … 1322 1322 fu16_t type; 1323 1323 const char *sn = NULL; 1324 1324 1325 1325 va_start(ap, fr); 1326 1326 type = (fu16_t)va_arg(ap, unsigned int); 1327 1327 sn = va_arg(ap, const char *); 1328 1328 va_end(ap); 1329 1329 1330 1330 owl_function_debugmsg("faimtest_parse_msgack: 0x%04x / %s\n", type, sn); 1331 1331 1332 1332 return 1; 1333 1333 } … … 1346 1346 fu32_t windowsize, clear, alert, limit, disconnect; 1347 1347 fu32_t currentavg, maxavg; 1348 1349 va_start(ap, fr); 1350 1348 1349 va_start(ap, fr); 1350 1351 1351 /* See code explanations below */ 1352 1352 code = (fu16_t)va_arg(ap, unsigned int); 1353 1353 1354 1354 /* 1355 1355 * See comments above aim_parse_ratechange_middle() in aim_rxhandlers.c. 1356 1356 */ 1357 1357 rateclass = (fu16_t)va_arg(ap, unsigned int); 1358 1359 /* 1360 * Not sure what this is exactly. I think its the temporal 1358 1359 /* 1360 * Not sure what this is exactly. I think its the temporal 1361 1361 * relation factor (ie, how to make the rest of the numbers 1362 * make sense in the real world). 1362 * make sense in the real world). 1363 1363 */ 1364 1364 windowsize = va_arg(ap, fu32_t); 1365 1365 1366 1366 /* Explained below */ 1367 1367 clear = va_arg(ap, fu32_t); … … 1371 1371 currentavg = va_arg(ap, fu32_t); 1372 1372 maxavg = va_arg(ap, fu32_t); 1373 1374 va_end(ap); 1375 1373 1374 va_end(ap); 1375 1376 1376 owl_function_debugmsg("faimtest_parse_ratechange: rate %s (rate class 0x%04x): curavg = %u, maxavg = %u, alert at %u, clear warning at %u, limit at %u, disconnect at %u (window size = %u)", 1377 1377 (code < 5)?codes[code]:"invalid", … … 1389 1389 fu16_t newevil; 1390 1390 aim_userinfo_t *userinfo; 1391 1391 1392 1392 va_start(ap, fr); 1393 1393 newevil = (fu16_t)va_arg(ap, unsigned int); 1394 1394 userinfo = va_arg(ap, aim_userinfo_t *); 1395 1395 va_end(ap); 1396 1396 1397 1397 /* 1398 1398 * Evil Notifications that are lacking userinfo->sn are anon-warns … … 1404 1404 */ 1405 1405 owl_function_debugmsg("faimtest_parse_evilnotify: new value = %2.1f%% (caused by %s)\n", ((float)newevil)/10, (userinfo && strlen(userinfo->sn))?userinfo->sn:"anonymous"); 1406 1406 1407 1407 return 1; 1408 1408 } … … 1414 1414 int num, i; 1415 1415 GPtrArray *list; 1416 1416 1417 1417 va_start(ap, fr); 1418 1418 address = va_arg(ap, const char *); … … 1422 1422 1423 1423 list = g_ptr_array_new(); 1424 1424 1425 1425 owl_function_debugmsg("faimtest_parse_searchreply: E-Mail Search Results for %s: ", address); 1426 1426 for (i=0; i<num; i++) { … … 1437 1437 va_list ap; 1438 1438 const char *address; 1439 1439 1440 1440 va_start(ap, fr); 1441 1441 address = va_arg(ap, const char *); … … 1444 1444 owl_function_error("No results searching for %s", address); 1445 1445 owl_function_debugmsg("faimtest_parse_searcherror: E-Mail Search Results for %s: No Results or Invalid Email\n", address); 1446 1446 1447 1447 return(1); 1448 1448 } … … 1453 1453 const char *msg, *url; 1454 1454 fu16_t width, height, delay; 1455 1455 1456 1456 va_start(ap, fr); 1457 1457 msg = va_arg(ap, const char *); … … 1461 1461 delay = va_arg(ap, unsigned int); 1462 1462 va_end(ap); 1463 1463 1464 1464 owl_function_debugmsg("handlepopup: (%dx%x:%d) %s (%s)\n", width, height, delay, msg, url); 1465 1465 1466 1466 return 1; 1467 1467 } … … 1479 1479 const char *bosip; 1480 1480 fu8_t *cookie; 1481 1481 1482 1482 va_start(ap, fr); 1483 1483 bosip = va_arg(ap, const char *); 1484 1484 cookie = va_arg(ap, fu8_t *); 1485 1485 va_end(ap); 1486 1486 1487 1487 owl_function_debugmsg("migrate: migration in progress -- new BOS is %s -- disconnecting", bosip); 1488 1488 aim_conn_kill(sess, &fr->conn); 1489 1489 1490 1490 if (!(bosconn = aim_newconn(sess, AIM_CONN_TYPE_BOS, bosip))) { 1491 1491 owl_function_debugmsg("migrate: could not connect to BOS: internal error"); 1492 1492 return 1; 1493 } else if (bosconn->status & AIM_CONN_STATUS_CONNERR) { 1493 } else if (bosconn->status & AIM_CONN_STATUS_CONNERR) { 1494 1494 owl_function_debugmsg("migrate: could not connect to BOS"); 1495 1495 aim_conn_kill(sess, &bosconn); 1496 1496 return 1; 1497 1497 } 1498 1498 1499 1499 /* Login will happen all over again. */ 1500 1500 addcb_bos(sess, bosconn); … … 1508 1508 /* aim_ssi_reqdata(sess, fr->conn, 0, 0x0000); */ 1509 1509 aim_ssi_reqdata(sess); 1510 1510 1511 1511 return(1); 1512 1512 } … … 1523 1523 struct aim_ssi_item *l; 1524 1524 */ 1525 1525 1526 1526 va_start(ap, fr); 1527 1527 fmtver = va_arg(ap, unsigned int); … … 1530 1530 list = va_arg(ap, struct aim_ssi_item *); 1531 1531 va_end(ap); 1532 1532 1533 1533 owl_function_debugmsg("ssiddata: got SSI data (0x%02x, %d items, %u)", fmtver, itemcount, stamp); 1534 1534 /* … … 1540 1540 */ 1541 1541 aim_ssi_enable(sess); 1542 1542 1543 1543 return 1; 1544 1544 } … … 1556 1556 va_list ap; 1557 1557 struct aim_icq_offlinemsg *msg; 1558 1558 1559 1559 va_start(ap, fr); 1560 1560 msg = va_arg(ap, struct aim_icq_offlinemsg *); 1561 1561 va_end(ap); 1562 1562 1563 1563 if (msg->type == 0x0001) { 1564 1564 owl_function_debugmsg("offlinemsg: from %u at %d/%d/%d %02d:%02d : %s", msg->sender, msg->year, msg->month, msg->day, msg->hour, msg->minute, msg->msg); … … 1586 1586 int count; 1587 1587 /* int i; */ 1588 1588 1589 1589 va_start(ap, fr); 1590 1590 count = va_arg(ap, int); … … 1608 1608 /* int i; */ 1609 1609 1610 1610 1611 1611 va_start(ap, fr); 1612 1612 count = va_arg(ap, int); 1613 1613 userinfo = va_arg(ap, aim_userinfo_t *); 1614 1614 va_end(ap); 1615 1615 1616 1616 /* 1617 1617 printf("chat: %s: Some occupants have left:\n", aim_chat_getname(fr->conn)); 1618 1618 1619 1619 for (i = 0; i < count; i++) 1620 1620 printf("chat: %s: \t%s\n", aim_chat_getname(fr->conn), userinfo[i].sn); … … 1635 1635 const char *croomname; 1636 1636 /* int i; */ 1637 1637 1638 1638 croomname = aim_chat_getname(fr->conn); 1639 1639 1640 1640 va_start(ap, fr); 1641 1641 roominfo = va_arg(ap, struct aim_chat_roominfo *); … … 1662 1662 for (i = 0; i < usercount; i++) 1663 1663 printf("chat: %s: \t\t%s\n", croomname, userinfo[i].sn); 1664 1665 owl_function_debugmsg("chat: %s: \tRoom flags: 0x%04x (%s%s%s%s)\n", 1664 1665 owl_function_debugmsg("chat: %s: \tRoom flags: 0x%04x (%s%s%s%s)\n", 1666 1666 croomname, flags, 1667 1667 (flags & AIM_CHATROOM_FLAG_EVILABLE) ? "Evilable, " : "", … … 1675 1675 printf("chat: %s: \tMax visible message length: %d bytes\n", croomname, maxvisiblemsglen); 1676 1676 */ 1677 1677 1678 1678 return(1); 1679 1679 } … … 1685 1685 const char *msg; 1686 1686 char tmpbuf[1152]; 1687 1688 va_start(ap, fr); 1689 userinfo = va_arg(ap, aim_userinfo_t *); 1687 1688 va_start(ap, fr); 1689 userinfo = va_arg(ap, aim_userinfo_t *); 1690 1690 msg = va_arg(ap, const char *); 1691 1691 va_end(ap); … … 1696 1696 printf("chat: %s: incoming msg from %s: %s\n", aim_chat_getname(fr->conn), userinfo->sn, msg); 1697 1697 */ 1698 1698 1699 1699 /* 1700 1700 * Do an echo for testing purposes. But not for ourselves ("oops!") … … 1704 1704 aim_chat_send_im(sess, fr->conn, 0, tmpbuf, strlen(tmpbuf)); 1705 1705 } 1706 1706 1707 1707 return 1; 1708 1708 } … … 1717 1717 aim_conn_addhandler(sess, fr->conn, AIM_CB_FAM_CHT, AIM_CB_CHT_ROOMINFOUPDATE, faimtest_chat_infoupdate, 0); 1718 1718 aim_conn_addhandler(sess, fr->conn, AIM_CB_FAM_CHT, AIM_CB_CHT_INCOMINGMSG, faimtest_chat_incomingmsg, 0); 1719 1719 1720 1720 aim_clientready(sess, fr->conn); 1721 1721 1722 1722 owl_function_debugmsg("Chat ready"); 1723 1723 … … 1735 1735 1736 1736 owl_function_debugmsg("in faimtest_chatnav_redirect"); 1737 1737 1738 1738 tstconn = aim_newconn(sess, AIM_CONN_TYPE_CHATNAV, redir->ip); 1739 1739 if (!tstconn || (tstconn->status & AIM_CONN_STATUS_RESOLVERR)) { … … 1743 1743 return; 1744 1744 } 1745 1745 1746 1746 aim_conn_addhandler(sess, tstconn, AIM_CB_FAM_SPECIAL, AIM_CB_SPECIAL_CONNCOMPLETE, faimtest_conncomplete, 0); 1747 1747 aim_conn_addhandler(sess, tstconn, AIM_CB_FAM_SPECIAL, AIM_CB_SPECIAL_CONNINITDONE, conninitdone_chat, 0); … … 1757 1757 1758 1758 owl_function_debugmsg("in chat_redirect"); 1759 1759 1760 1760 tstconn = aim_newconn(sess, AIM_CONN_TYPE_CHAT, redir->ip); 1761 1761 if (!tstconn || (tstconn->status & AIM_CONN_STATUS_RESOLVERR)) { 1762 1762 /* printf("unable to connect to chat server\n"); */ 1763 1763 if (tstconn) aim_conn_kill(sess, &tstconn); 1764 return; 1765 } 1764 return; 1765 } 1766 1766 /* printf("chat: connected to %s instance %d on exchange %d\n", redir->chat.room, redir->chat.instance, redir->chat.exchange); */ 1767 1767 1768 1768 /* 1769 1769 * We must do this to attach the stored name to the connection! … … 1773 1773 aim_conn_addhandler(sess, tstconn, AIM_CB_FAM_SPECIAL, AIM_CB_SPECIAL_CONNINITDONE, conninitdone_chat, 0); 1774 1774 aim_sendcookie(sess, tstconn, redir->cookielen, redir->cookie); 1775 return; 1775 return; 1776 1776 } 1777 1777
Note: See TracChangeset
for help on using the changeset viewer.