diff libgaim/protocols/msn/user.c @ 20391:0b0ecee55091

The second msn.tgz from SF Patch #1621854 from Ka-Hing Cheung. "new version, fixes some crashes because group_id is char * but in some places it's set to an int (!). skadotnet, I don't understand why you need `if (!strcmp(type, "MFN")) {` in so many places, so I didn't include most of them. I also have different versions of some of your fixes because I already fixed them. Group manipulations may still not work, at least it's not crashing :-)" committer: Richard Laager <rlaager@wiktel.com>
author Ka-Hing Cheung <khc@hxbc.us>
date Sun, 15 Apr 2007 02:43:47 +0000
parents e354528c4163
children
line wrap: on
line diff
--- a/libgaim/protocols/msn/user.c	Sun Apr 15 02:18:17 2007 +0000
+++ b/libgaim/protocols/msn/user.c	Sun Apr 15 02:43:47 2007 +0000
@@ -90,7 +90,7 @@
 	account = user->userlist->session->account;
 
 	if (user->statusline != NULL) {
-		char *status = g_strdup_printf("%s - %s", user->status, user->statusline);
+		//char *status = g_strdup_printf("%s - %s", user->status, user->statusline);
 		gaim_prpl_got_user_status(account, user->passport, user->status, "message", user->statusline, NULL);
 	}
 	else if (user->status != NULL) {
@@ -188,7 +188,7 @@
 void
 msn_user_set_op(MsnUser *user,int list_op)
 {
-	g_return_if_fail(list_op != NULL);
+	g_return_if_fail(list_op != 0);
 	user->list_op |= list_op;
 }
 
@@ -277,14 +277,14 @@
 	GaimBuddy *b;
 	GaimGroup *g;
 	const char *passport;
-	const char *group_id;
+	char *group_id;
 	const char *group_name;
 
 	g_return_if_fail(user != NULL);
 	g_return_if_fail(id != NULL);
 
 	group_id = g_strdup(id);
-	user->group_ids = g_list_append(user->group_ids,group_id);
+	user->group_ids = g_list_append(user->group_ids, group_id);
 
 	userlist = user->userlist;
 	account = userlist->session->account;
@@ -337,7 +337,8 @@
 	g_return_if_fail(id != NULL);
 
 	user->group_ids = g_list_remove(user->group_ids, id);
-	g_free(id);
+	/* khc need to use g_list_find_custom here to find the right link */
+	//g_free(id);
 }
 
 void