Mercurial > pidgin.yaz
changeset 20346:07c2e60026da
applied changes from e9e74094baa29c6f5589385507221a2502b817fb
through 9c0eac6528c65b06c0ac062dd0f682bf594522cb
applied changes from ca09db83bd2ae802d4a6d7078a1efdfe9a896cb5
through 55c9e6a9c4728a7d3394eb9f5c6042bc0657e72d
applied changes from 7d6d68e181cad51516162cb1ccf769a1204c4688
through 99cf68a5d3604fa8f1e05918e5b370a6a4991cd1
applied changes from 99cf68a5d3604fa8f1e05918e5b370a6a4991cd1
through 111659964eabcb60dd83e3598df42b5d4b788a90
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Sun, 21 Oct 2007 04:44:56 +0000 |
parents | 9acf4a2ef166 |
children | 04fe5601fedb |
files | finch/libgnt/gntfilesel.c libpurple/protocols/bonjour/buddy.c libpurple/protocols/bonjour/buddy.h libpurple/protocols/simple/simple.c libpurple/util.c |
diffstat | 5 files changed, 21 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/finch/libgnt/gntfilesel.c Sun Oct 21 04:42:58 2007 +0000 +++ b/finch/libgnt/gntfilesel.c Sun Oct 21 04:44:56 2007 +0000 @@ -265,6 +265,7 @@ } g_free(fp); } + g_dir_close(dir); *files = g_list_reverse(*files); return TRUE;
--- a/libpurple/protocols/bonjour/buddy.c Sun Oct 21 04:42:58 2007 +0000 +++ b/libpurple/protocols/bonjour/buddy.c Sun Oct 21 04:44:56 2007 +0000 @@ -62,9 +62,11 @@ } 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"))
--- a/libpurple/protocols/bonjour/buddy.h Sun Oct 21 04:42:58 2007 +0000 +++ b/libpurple/protocols/bonjour/buddy.h Sun Oct 21 04:44:56 2007 +0000 @@ -83,7 +83,7 @@ /** * 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.
--- a/libpurple/protocols/simple/simple.c Sun Oct 21 04:42:58 2007 +0000 +++ b/libpurple/protocols/simple/simple.c Sun Oct 21 04:44:56 2007 +0000 @@ -1071,7 +1071,7 @@ 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 @@ if(!pidf) { purple_debug_info("simple", "process_incoming_notify: no parseable pidf\n"); + purple_prpl_got_user_status(sip->account, from, "offline", NULL); + send_sip_response(sip->gc, msg, 200, "OK", NULL); g_free(from); - send_sip_response(sip->gc, msg, 200, "OK", NULL); return; } @@ -1100,27 +1101,28 @@ 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); - g_free(from); send_sip_response(sip->gc, msg, 200, "OK", NULL); }
--- a/libpurple/util.c Sun Oct 21 04:42:58 2007 +0000 +++ b/libpurple/util.c Sun Oct 21 04:44:56 2007 +0000 @@ -2582,6 +2582,8 @@ 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 @@ } /* 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 */