diff libpurple/protocols/jabber/si.c @ 27724:26f55eb6ab59

propagate from branch 'im.pidgin.pidgin' (head 1cb036aecbbe359226e69874379d39ce74c8daf6) to branch 'im.pidgin.pidgin.yaz' (head 99515d90725804d37c9baeec606e2f4e2ec5a61f)
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Wed, 19 Sep 2007 08:27:28 +0000
parents 44b4e8bd759b d892a9275d0d
children 98604b4bfa3b
line wrap: on
line diff
--- a/libpurple/protocols/jabber/si.c	Wed Sep 19 06:22:25 2007 +0000
+++ b/libpurple/protocols/jabber/si.c	Wed Sep 19 08:27:28 2007 +0000
@@ -38,6 +38,8 @@
 
 #include "si.h"
 
+#include "util.h"
+
 struct bytestreams_streamhost {
 	char *jid;
 	char *host;
@@ -668,7 +670,16 @@
 	xmlnode *si, *file, *feature, *x, *field, *option, *value;
 	char buf[32];
 
-	xfer->filename = g_path_get_basename(xfer->local_filename);
+//	xfer->filename = g_path_get_basename(xfer->local_filename);
+	{ /* yaz */
+		guchar *tmp;
+		size_t dummy;
+		tmp = botch_utf(xfer->filename, strlen(xfer->filename), &dummy);
+		if(tmp){
+			purple_xfer_set_filename(xfer, (char *)tmp);
+			g_free(tmp);
+		}
+	}
 
 	iq = jabber_iq_new(jsx->js, JABBER_IQ_SET);
 	xmlnode_set_attrib(iq->node, "to", xfer->who);