# HG changeset patch # User Christian Hammond # Date 1053030490 0 # Node ID 150cf161509856915007c42dbef8a349854f4fb8 # Parent 0b544518a365c5781abe9ff37463f4a1f7bc3a39 [gaim-migrate @ 5761] This should let gaim jump to the new notification server when the server tells us to. committer: Tailor Script diff -r 0b544518a365 -r 150cf1615098 src/protocols/msn/notification.c --- a/src/protocols/msn/notification.c Thu May 15 20:26:34 2003 +0000 +++ b/src/protocols/msn/notification.c Thu May 15 20:28:10 2003 +0000 @@ -1031,7 +1031,7 @@ char *c; int port; - if (strcmp(params[1], "SB")) { + if (strcmp(params[1], "SB") && strcmp(params[1], "NS")) { hide_login_progress(gc, _("Got invalid XFR")); signoff(gc); @@ -1047,25 +1047,40 @@ else port = 1863; - swboard = msn_session_find_unused_switch(session); + if (!strcmp(params[1], "SB")) { + swboard = msn_session_find_unused_switch(session); - if (swboard == NULL) { - gaim_debug(GAIM_DEBUG_ERROR, "msn", - "Received an XFR SB request when there's no unused " - "switchboards!\n"); - return FALSE; - } + if (swboard == NULL) { + gaim_debug(GAIM_DEBUG_ERROR, "msn", + "Received an XFR SB request when there's no unused " + "switchboards!\n"); + return FALSE; + } + + msn_switchboard_set_auth_key(swboard, params[4]); + + if (!msn_switchboard_connect(swboard, host, port)) { + gaim_debug(GAIM_DEBUG_ERROR, "msn", + "Unable to connect to switchboard on %s, port %d\n", + host, port); - msn_switchboard_set_auth_key(swboard, params[4]); + g_free(host); + + return FALSE; + } + } + else if (!strcmp(params[1], "NS")) { + msn_servconn_destroy(session->notification_conn); - if (!msn_switchboard_connect(swboard, host, port)) { - gaim_debug(GAIM_DEBUG_ERROR, "msn", - "Unable to connect to switchboard on %s, port %d\n", - host, port); + session->notification_conn = msn_notification_new(session, host, port); - g_free(host); + if (!msn_servconn_connect(session->notification_conn)) { + hide_login_progress(gc, _("Unable to transfer to " + "notification server")); + signoff(gc); - return FALSE; + return FALSE; + } } g_free(host);