Mercurial > pidgin
comparison src/oscar.c @ 2067:a23832262ca2
[gaim-migrate @ 2077]
god damn it mid
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Fri, 13 Jul 2001 18:19:38 +0000 |
parents | 05df89293018 |
children | 3937f5eb6d75 |
comparison
equal
deleted
inserted
replaced
2066:05df89293018 | 2067:a23832262ca2 |
---|---|
89 | 89 |
90 GSList *oscar_chats; | 90 GSList *oscar_chats; |
91 GSList *direct_ims; | 91 GSList *direct_ims; |
92 GSList *getfiles; | 92 GSList *getfiles; |
93 GSList *hasicons; | 93 GSList *hasicons; |
94 | |
95 gboolean killme; | |
94 }; | 96 }; |
95 | 97 |
96 struct chat_connection { | 98 struct chat_connection { |
97 char *name; | 99 char *name; |
98 char *show; /* AOL did something funny to us */ | 100 char *show; /* AOL did something funny to us */ |
349 debug_printf(_("connection error (rend)\n")); | 351 debug_printf(_("connection error (rend)\n")); |
350 } | 352 } |
351 } else { | 353 } else { |
352 if (aim_get_command(odata->sess, conn) >= 0) { | 354 if (aim_get_command(odata->sess, conn) >= 0) { |
353 aim_rxdispatch(odata->sess); | 355 aim_rxdispatch(odata->sess); |
356 if (odata->killme) | |
357 signoff(gc); | |
354 } else { | 358 } else { |
355 if ((conn->type == AIM_CONN_TYPE_BOS) || | 359 if ((conn->type == AIM_CONN_TYPE_BOS) || |
356 !(aim_getconn_type(odata->sess, AIM_CONN_TYPE_BOS))) { | 360 !(aim_getconn_type(odata->sess, AIM_CONN_TYPE_BOS))) { |
357 debug_printf(_("major connection error\n")); | 361 debug_printf(_("major connection error\n")); |
358 hide_login_progress(gc, _("Disconnected.")); | 362 hide_login_progress(gc, _("Disconnected.")); |
586 char *latestreleaseinfo = NULL, *latestbetainfo = NULL; | 590 char *latestreleaseinfo = NULL, *latestbetainfo = NULL; |
587 int i; char *host; int port; | 591 int i; char *host; int port; |
588 struct aim_user *user; | 592 struct aim_user *user; |
589 | 593 |
590 struct gaim_connection *gc = sess->aux_data; | 594 struct gaim_connection *gc = sess->aux_data; |
595 struct oscar_data *od = gc->proto_data; | |
591 user = gc->user; | 596 user = gc->user; |
592 port = user->proto_opt[USEROPT_AUTHPORT][0] ? | 597 port = user->proto_opt[USEROPT_AUTHPORT][0] ? |
593 atoi(user->proto_opt[USEROPT_AUTHPORT]) : FAIM_LOGIN_PORT, | 598 atoi(user->proto_opt[USEROPT_AUTHPORT]) : FAIM_LOGIN_PORT, |
594 | 599 |
595 va_start(ap, command); | 600 va_start(ap, command); |
640 hide_login_progress(gc, _("Authentication Failed")); | 645 hide_login_progress(gc, _("Authentication Failed")); |
641 break; | 646 break; |
642 } | 647 } |
643 debug_printf("Login Error Code 0x%04x\n", errorcode); | 648 debug_printf("Login Error Code 0x%04x\n", errorcode); |
644 debug_printf("Error URL: %s\n", errurl); | 649 debug_printf("Error URL: %s\n", errurl); |
645 aim_conn_kill(sess, &command->conn); | 650 od->killme = TRUE; |
646 signoff(gc); | |
647 return 1; | 651 return 1; |
648 } | 652 } |
649 | 653 |
650 | 654 |
651 debug_printf("Reg status: %2d\n", regstatus); | 655 debug_printf("Reg status: %2d\n", regstatus); |
665 aim_conn_kill(sess, &command->conn); | 669 aim_conn_kill(sess, &command->conn); |
666 | 670 |
667 bosconn = aim_newconn(sess, AIM_CONN_TYPE_BOS, NULL); | 671 bosconn = aim_newconn(sess, AIM_CONN_TYPE_BOS, NULL); |
668 if (bosconn == NULL) { | 672 if (bosconn == NULL) { |
669 hide_login_progress(gc, _("Internal Error")); | 673 hide_login_progress(gc, _("Internal Error")); |
670 signoff(gc); | 674 od->killme = TRUE; |
671 return 1; | 675 return 0; |
672 } | 676 } |
673 | 677 |
674 aim_conn_addhandler(sess, bosconn, 0x0009, 0x0003, gaim_bosrights, 0); | 678 aim_conn_addhandler(sess, bosconn, 0x0009, 0x0003, gaim_bosrights, 0); |
675 aim_conn_addhandler(sess, bosconn, 0x0001, 0x0007, gaim_rateresp, 0); /* rate info */ | 679 aim_conn_addhandler(sess, bosconn, 0x0001, 0x0007, gaim_rateresp, 0); /* rate info */ |
676 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_ACK, AIM_CB_ACK_ACK, NULL, 0); | 680 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_ACK, AIM_CB_ACK_ACK, NULL, 0); |
708 bosconn->status |= AIM_CONN_STATUS_INPROGRESS; | 712 bosconn->status |= AIM_CONN_STATUS_INPROGRESS; |
709 bosconn->fd = proxy_connect(host, port, oscar_bos_connect, gc); | 713 bosconn->fd = proxy_connect(host, port, oscar_bos_connect, gc); |
710 g_free(host); | 714 g_free(host); |
711 if (bosconn->fd < 0) { | 715 if (bosconn->fd < 0) { |
712 hide_login_progress(gc, _("Could Not Connect")); | 716 hide_login_progress(gc, _("Could Not Connect")); |
713 signoff(gc); | 717 od->killme = TRUE; |
714 return 1; | 718 return 0; |
715 } | 719 } |
716 aim_auth_sendcookie(sess, bosconn, cookie); | 720 aim_auth_sendcookie(sess, bosconn, cookie); |
717 gdk_input_remove(gc->inpa); | 721 gdk_input_remove(gc->inpa); |
718 return 1; | 722 return 1; |
719 } | 723 } |