Mercurial > pidgin.yaz
diff libpurple/protocols/jabber/si.c @ 31648:fa88dc1dcabb
merged from im.pidgin.pidgin
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Sat, 12 Feb 2011 04:17:09 +0900 |
parents | 29b4f2c52533 a8cc50c2279f |
children | 7281d151e492 |
line wrap: on
line diff
--- a/libpurple/protocols/jabber/si.c Tue Dec 21 21:05:26 2010 +0900 +++ b/libpurple/protocols/jabber/si.c Sat Feb 12 04:17:09 2011 +0900 @@ -1244,11 +1244,13 @@ /* yaz */ f1 = g_filename_display_basename(xfer->local_filename); f2 = botch_utf(f1, strlen(f1), &dummy); - if(f2){ - purple_xfer_set_filename(xfer, (char *)f2); + if(f2) { + xfer->filename = f2; + g_free(f1); f1 = NULL; } - g_free(f1); f1 = NULL; - g_free(f2); f2 = NULL; + else { + xfer->filename = f1; + } iq = jabber_iq_new(jsx->js, JABBER_IQ_SET); xmlnode_set_attrib(iq->node, "to", xfer->who); @@ -1516,7 +1518,7 @@ JabberBuddyResource *jbr = NULL; char *resource; GList *resources = NULL; - + if(NULL != (resource = jabber_get_resource(xfer->who))) { /* they've specified a resource, no need to ask or * default or anything, just do it */ @@ -1542,7 +1544,7 @@ } } } - + if (!resources) { /* no resources online, we're trying to send to someone * whose presence we're not subscribed to, or @@ -1571,7 +1573,7 @@ PurpleRequestFields *fields = purple_request_fields_new(); PurpleRequestField *field = purple_request_field_choice_new("resource", _("Resource"), 0); PurpleRequestFieldGroup *group = purple_request_field_group_new(NULL); - + for(l = resources; l; l = l->next) { jbr = l->data; purple_request_field_choice_add(field, jbr->name);