im.pidgin.pidgin.2.2.2: 7b6ef5afbcb6989c18094571dad17938c5515f00

lschiere at pidgin.im lschiere at pidgin.im
Sun Oct 21 01:16:31 EDT 2007


-----------------------------------------------------------------
Revision: 7b6ef5afbcb6989c18094571dad17938c5515f00
Ancestor: 0c5e80a5f6f35ce8c6cb1442686bf87a2c82e044
Author: lschiere at pidgin.im
Date: 2007-10-21T04:44:56
Branch: im.pidgin.pidgin.2.2.2

Modified files:
        finch/libgnt/gntfilesel.c
        libpurple/protocols/bonjour/buddy.c
        libpurple/protocols/bonjour/buddy.h
        libpurple/protocols/simple/simple.c libpurple/util.c

ChangeLog: 

applied changes from e9e74094baa29c6f5589385507221a2502b817fb
             through 9c0eac6528c65b06c0ac062dd0f682bf594522cb

applied changes from ca09db83bd2ae802d4a6d7078a1efdfe9a896cb5
             through 55c9e6a9c4728a7d3394eb9f5c6042bc0657e72d

applied changes from 7d6d68e181cad51516162cb1ccf769a1204c4688
             through 99cf68a5d3604fa8f1e05918e5b370a6a4991cd1

applied changes from 99cf68a5d3604fa8f1e05918e5b370a6a4991cd1
             through 111659964eabcb60dd83e3598df42b5d4b788a90

-------------- next part --------------
============================================================
--- finch/libgnt/gntfilesel.c	9b0b9915198feba365aa1ab138dbf89f6d8f8aa7
+++ finch/libgnt/gntfilesel.c	eb1241ed87d27c4878ad567bd116f3a91fbd2368
@@ -265,6 +265,7 @@ local_read_fn(const char *path, GList **
 		}
 		g_free(fp);
 	}
+	g_dir_close(dir);
 
 	*files = g_list_reverse(*files);
 	return TRUE;
============================================================
--- libpurple/protocols/bonjour/buddy.c	016bf76cefd030d72c070e3d1848de2156950a93
+++ libpurple/protocols/bonjour/buddy.c	9c6a665becc68873fddb59ebdc6d45038066f5cf
@@ -62,9 +62,11 @@ void
 }
 
 void
-set_bonjour_buddy_value(BonjourBuddy* buddy, const char *record_key, const char *value, uint32_t len){
+set_bonjour_buddy_value(BonjourBuddy* buddy, const char *record_key, const char *value, guint32 len){
 	gchar **fld = NULL;
 
+	g_return_if_fail(record_key != NULL);
+
 	if (!strcmp(record_key, "1st"))
 		fld = &buddy->first;
 	else if(!strcmp(record_key, "email"))
============================================================
--- libpurple/protocols/bonjour/buddy.h	0dc69fe0eae5d513bd017b7a96733385684699f9
+++ libpurple/protocols/bonjour/buddy.h	085ae98d1521773a6534498ceb1afefb66057ba2
@@ -83,7 +83,7 @@ void clear_bonjour_buddy_values(BonjourB
 /**
  * Sets a value in the BonjourBuddy struct, destroying the old value
  */
-void set_bonjour_buddy_value(BonjourBuddy *buddy, const char *record_key, const char *value, uint32_t len);
+void set_bonjour_buddy_value(BonjourBuddy *buddy, const char *record_key, const char *value, guint32 len);
 
 /**
  * Check if all the compulsory buddy data is present.
============================================================
--- libpurple/protocols/simple/simple.c	b99cf408e2c4baf5a1b6f5fd02c6aa7d13366174
+++ libpurple/protocols/simple/simple.c	5fc19ea989d4a8abc949c6f88b4dd4244019b304
@@ -1071,7 +1071,7 @@ static void process_incoming_notify(stru
 static void process_incoming_notify(struct simple_account_data *sip, struct sipmsg *msg) {
 	gchar *from;
 	gchar *fromhdr;
-	gchar *tmp2;
+	gchar *basicstatus_data;
 	xmlnode *pidf;
 	xmlnode *basicstatus = NULL, *tuple, *status;
 	gboolean isonline = FALSE;
@@ -1084,8 +1084,9 @@ static void process_incoming_notify(stru
 
 	if(!pidf) {
 		purple_debug_info("simple", "process_incoming_notify: no parseable pidf\n");
-		g_free(from);
+		purple_prpl_got_user_status(sip->account, from, "offline", NULL);
 		send_sip_response(sip->gc, msg, 200, "OK", NULL);
+		g_free(from);
 		return;
 	}
 
@@ -1100,27 +1101,28 @@ static void process_incoming_notify(stru
 		return;
 	}
 
-	tmp2 = xmlnode_get_data(basicstatus);
+	basicstatus_data = xmlnode_get_data(basicstatus);
 
-	if(!tmp2) {
+	if(!basicstatus_data) {
 		purple_debug_info("simple", "process_incoming_notify: no basic data found\n");
 		xmlnode_free(pidf);
 		g_free(from);
 		return;
 	}
 
-	if(strstr(tmp2, "open")) {
+	if(strstr(basicstatus_data, "open"))
 		isonline = TRUE;
-	}
 
-	g_free(tmp2);
 
-	if(isonline) purple_prpl_got_user_status(sip->account, from, "available", NULL);
-	else purple_prpl_got_user_status(sip->account, from, "offline", NULL);
+	if(isonline) 
+		purple_prpl_got_user_status(sip->account, from, "available", NULL);
+	else 
+		purple_prpl_got_user_status(sip->account, from, "offline", NULL);
 
 	xmlnode_free(pidf);
-
 	g_free(from);
+	g_free(basicstatus_data);
+
 	send_sip_response(sip->gc, msg, 200, "OK", NULL);
 }
 
============================================================
--- libpurple/util.c	111e245693d8857b91838d187429f2b8603b31dd
+++ libpurple/util.c	1348846bb0c02a628509cdb73b39f739c1eb3110
@@ -2582,6 +2582,8 @@ purple_util_write_data_to_file_absolute(
 	purple_debug_info("util", "Writing file %s\n",
 					filename_full);
 
+	g_return_val_if_fail((size >= -1), FALSE);
+
 	filename_temp = g_strdup_printf("%s.save", filename_full);
 
 	/* Remove an old temporary file, if one exists */
@@ -2607,7 +2609,7 @@ purple_util_write_data_to_file_absolute(
 	}
 
 	/* Write to file */
-	real_size = (size == -1) ? strlen(data) : size;
+	real_size = (size == -1) ? strlen(data) : (size_t) size;
 	byteswritten = fwrite(data, 1, real_size, file);
 
 	/* Close file */


More information about the Commits mailing list