soc.2008.yahoo: ea730904: Use purple_util_chrreplace instead of g_...
sulabh at soc.pidgin.im
sulabh at soc.pidgin.im
Tue Jul 22 15:46:45 EDT 2008
-----------------------------------------------------------------
Revision: ea7309049612b4f3068e248583b0278fe933bc74
Ancestor: 5471c106d8d3b36e260ba435b2e37fc345e3636f
Author: sulabh at soc.pidgin.im
Date: 2008-07-20T17:37:46
Branch: im.pidgin.soc.2008.yahoo
URL: http://d.pidgin.im/viewmtn/revision/info/ea7309049612b4f3068e248583b0278fe933bc74
Modified files:
libpurple/protocols/yahoo/yahoo_filexfer.c
ChangeLog:
Use purple_util_chrreplace instead of g_strsplit then g_strjoinv
-------------- next part --------------
============================================================
--- libpurple/protocols/yahoo/yahoo_filexfer.c 385b31f3f127a48dcf47261e2c79f809420a4e41
+++ libpurple/protocols/yahoo/yahoo_filexfer.c c1ec9147fbd92064afd66831994b530123953afb
@@ -1417,7 +1417,6 @@ static void yahoo_p2p_ft_server_listen_c
gchar *filename;
const char *local_ip;
gchar *url_to_send = NULL;
- char **split;
char *filename_without_spaces = NULL;
xfer = data;
@@ -1434,8 +1433,8 @@ static void yahoo_p2p_ft_server_listen_c
xd->yahoo_local_p2p_ft_server_port = purple_network_get_port_from_fd(listenfd);
filename = g_path_get_basename(purple_xfer_get_local_filename(xfer));
- split = g_strsplit(filename, " ", 0);
- filename_without_spaces = g_strjoinv("+", split);
+ filename_without_spaces = g_strdup(filename);
+ purple_util_chrreplace(filename_without_spaces, ' ', '+');
xd->xfer_url = g_strdup_printf("/Messenger.%s.%d000%s?AppID=Messenger&UserID=%s&K=lc9lu2u89gz1llmplwksajkjx", xfer->who, (int)time(NULL), filename_without_spaces, xfer->who);
url_to_send = g_strdup_printf("http://%s:%d%s", local_ip, xd->yahoo_local_p2p_ft_server_port, xd->xfer_url);
@@ -1467,7 +1466,6 @@ static void yahoo_p2p_ft_server_listen_c
g_free(filename);
g_free(url_to_send);
- g_strfreev(split);
g_free(filename_without_spaces);
}
More information about the Commits
mailing list