comparison src/protocols/msn/notification.c @ 10296:a7b2fd5efcf2

[gaim-migrate @ 11476] Some "random updates" updates from patch 1077274 by Felipe Contreras: "Some changes in the behaviour of slpcalls (for FT), free some unused structures and properly close switchboard connections." Looks good to me, and seems to have fixed a mysterious FT problem that I had been pretending didn't exist. committer: Tailor Script <tailor@pidgin.im>
author Stu Tomlinson <stu@nosnilmot.com>
date Thu, 02 Dec 2004 16:07:26 +0000
parents f776e117c17b
children 926bd0e5f487
comparison
equal deleted inserted replaced
10295:0cf2a686266e 10296:a7b2fd5efcf2
28 #include "utils.h" 28 #include "utils.h"
29 #include "page.h" 29 #include "page.h"
30 30
31 #include "userlist.h" 31 #include "userlist.h"
32 #include "sync.h" 32 #include "sync.h"
33 #include "slplink.h"
33 34
34 #define BUDDY_ALIAS_MAXLEN 388 35 #define BUDDY_ALIAS_MAXLEN 388
35 36
36 static MsnTable *cbs_table; 37 static MsnTable *cbs_table;
37 38
445 static void 446 static void
446 fln_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd) 447 fln_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd)
447 { 448 {
448 GaimAccount *account; 449 GaimAccount *account;
449 450
451 MsnSlpLink *slplink;
452
450 account = cmdproc->session->account; 453 account = cmdproc->session->account;
451 454
452 gaim_prpl_got_user_status(account, cmd->params[0], "offline", NULL); 455 gaim_prpl_got_user_status(account, cmd->params[0], "offline", NULL);
456
457 slplink = msn_session_find_slplink(cmdproc->session, cmd->params[0]);
458
459 if (slplink != NULL)
460 msn_slplink_destroy(slplink);
461
453 } 462 }
454 463
455 /* 464 /*
456 * XXX - There is a bit of code duplication between this function 465 * XXX - There is a bit of code duplication between this function
457 * and nln_cmd. Someone should do something about that. 466 * and nln_cmd. Someone should do something about that.
1141 } 1150 }
1142 1151
1143 static void 1152 static void
1144 connect_cb(MsnServConn *servconn) 1153 connect_cb(MsnServConn *servconn)
1145 { 1154 {
1146 MsnNotification *notification;
1147 MsnCmdProc *cmdproc; 1155 MsnCmdProc *cmdproc;
1148 MsnSession *session; 1156 MsnSession *session;
1149 GaimAccount *account; 1157 GaimAccount *account;
1150 GaimConnection *gc;
1151 char **a, **c, *vers; 1158 char **a, **c, *vers;
1152 int i; 1159 int i;
1153 1160
1154 g_return_if_fail(servconn != NULL); 1161 g_return_if_fail(servconn != NULL);
1155 1162
1156 notification = servconn->data;
1157 cmdproc = servconn->cmdproc; 1163 cmdproc = servconn->cmdproc;
1158 session = servconn->session; 1164 session = servconn->session;
1159 account = session->account; 1165 account = session->account;
1160 gc = gaim_account_get_connection(account);
1161 1166
1162 /* Allocate an array for CVR0, NULL, and all the versions */ 1167 /* Allocate an array for CVR0, NULL, and all the versions */
1163 a = c = g_new0(char *, session->protocol_ver - 8 + 3); 1168 a = c = g_new0(char *, session->protocol_ver - 8 + 3);
1164 1169
1165 for (i = session->protocol_ver; i >= 8; i--) 1170 for (i = session->protocol_ver; i >= 8; i--)
1178 return; 1183 return;
1179 1184
1180 if (session->user == NULL) 1185 if (session->user == NULL)
1181 session->user = msn_user_new(session->userlist, 1186 session->user = msn_user_new(session->userlist,
1182 gaim_account_get_username(account), NULL); 1187 gaim_account_get_username(account), NULL);
1183
1184 #if 0
1185 gaim_connection_update_progress(gc, _("Syncing with server"),
1186 4, MSN_CONNECT_STEPS);
1187 #endif
1188 } 1188 }
1189 1189
1190 void 1190 void
1191 msn_notification_add_buddy(MsnNotification *notification, const char *list, 1191 msn_notification_add_buddy(MsnNotification *notification, const char *list,
1192 const char *who, const char *store_name, 1192 const char *who, const char *store_name,