summaryrefslogtreecommitdiff
path: root/libpurple/protocols/yahoo/yahoo_filexfer.c
diff options
context:
space:
mode:
Diffstat (limited to 'libpurple/protocols/yahoo/yahoo_filexfer.c')
-rw-r--r--libpurple/protocols/yahoo/yahoo_filexfer.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/libpurple/protocols/yahoo/yahoo_filexfer.c b/libpurple/protocols/yahoo/yahoo_filexfer.c
index 690f5796c9..b1f1d2aea6 100644
--- a/libpurple/protocols/yahoo/yahoo_filexfer.c
+++ b/libpurple/protocols/yahoo/yahoo_filexfer.c
@@ -983,8 +983,8 @@ static void yahoo_xfer_dns_connected_15(GSList *hosts, gpointer data, const char
struct yahoo_xfer_data *xd;
struct sockaddr_in *addr;
struct yahoo_packet *pkt;
- long actaddr;
- long a,b,c,d;
+ unsigned long actaddr;
+ unsigned char a,b,c,d;
PurpleConnection *gc;
PurpleAccount *account;
YahooData *yd;
@@ -1018,19 +1018,19 @@ static void yahoo_xfer_dns_connected_15(GSList *hosts, gpointer data, const char
/* TODO:actually, u must try with addr no.1 , if its not working addr no.2 ..... */
addr = hosts->data;
actaddr = addr->sin_addr.s_addr;
- d = actaddr % 256;
- actaddr = (actaddr - d) / 256;
- c = actaddr % 256;
- actaddr = (actaddr - c) / 256;
- b = actaddr % 256;
- actaddr = (actaddr - b) / 256;
- a = actaddr;
+ d = actaddr & 0xff;
+ actaddr >>= 8;
+ c = actaddr & 0xff;
+ actaddr >>= 8;
+ b = actaddr & 0xff;
+ actaddr >>= 8;
+ a = actaddr & 0xff;
if(yd->jp)
xd->port = YAHOOJP_XFER_RELAY_PORT;
else
xd->port = YAHOO_XFER_RELAY_PORT;
- url = g_strdup_printf("%ld.%ld.%ld.%ld", d, c, b, a);
+ url = g_strdup_printf("%u.%u.%u.%u", d, c, b, a);
/* Free the address... */
g_free(hosts->data);
@@ -1235,14 +1235,14 @@ static void yahoo_xfer_connected_15(gpointer data, gint source, const gchar *err
PurpleXfer *xfer;
struct yahoo_xfer_data *xd;
PurpleAccount *account;
- YahooData* yd;
+ PurpleConnection *gc;
if (!(xfer = data))
return;
if (!(xd = xfer->data))
return;
- yd = xd->gc->proto_data;
- account = purple_connection_get_account(xd->gc);
+ gc = xd->gc;
+ account = purple_connection_get_account(gc);
if ((source < 0) || (xd->path == NULL) || (xd->host == NULL)) {
purple_xfer_error(PURPLE_XFER_RECEIVE, purple_xfer_get_account(xfer),
xfer->who, _("Unable to connect."));
@@ -1253,7 +1253,7 @@ static void yahoo_xfer_connected_15(gpointer data, gint source, const gchar *err
if (xd->txbuflen == 0)
{
gchar* cookies;
- cookies = yahoo_get_cookies(xd->gc);
+ cookies = yahoo_get_cookies(gc);
if(purple_xfer_get_type(xfer) == PURPLE_XFER_SEND && xd->status_15 == ACCEPTED)
{
if(xd->info_val_249 == 2)