Mercurial > pidgin
changeset 28693:6aea98f6a5cd
Get rid of slpmsg->fp since the core is handling all the partial reads and
writes, and this is no longer used.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Fri, 20 Nov 2009 01:17:51 +0000 |
parents | 19e400679e61 |
children | 650ba1c84049 |
files | libpurple/protocols/msn/slplink.c libpurple/protocols/msn/slpmsg.c libpurple/protocols/msn/slpmsg.h |
diffstat | 3 files changed, 4 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/msn/slplink.c Fri Nov 20 00:35:30 2009 +0000 +++ b/libpurple/protocols/msn/slplink.c Fri Nov 20 01:17:51 2009 +0000 @@ -253,12 +253,6 @@ len = MIN(1202, slpmsg->slpcall->u.outgoing.len); msn_message_set_bin_data(msg, slpmsg->slpcall->u.outgoing.data, len); } - else if (slpmsg->fp) - { - char data[1202]; - len = fread(data, 1, sizeof(data), slpmsg->fp); - msn_message_set_bin_data(msg, data, len); - } else { len = slpmsg->size - slpmsg->offset; @@ -558,7 +552,7 @@ } } } - if (!slpmsg->fp && !slpmsg->ft && slpmsg->size) + if (!slpmsg->ft && slpmsg->size) { slpmsg->buffer = g_try_malloc(slpmsg->size); if (slpmsg->buffer == NULL) @@ -580,12 +574,7 @@ } } - if (slpmsg->fp) - { - /* fseek(slpmsg->fp, offset, SEEK_SET); */ - len = fwrite(data, 1, len, slpmsg->fp); - } - else if (slpmsg->ft) + if (slpmsg->ft) { xfer = slpmsg->slpcall->xfer; slpmsg->slpcall->u.incoming_data =
--- a/libpurple/protocols/msn/slpmsg.c Fri Nov 20 00:35:30 2009 +0000 +++ b/libpurple/protocols/msn/slpmsg.c Fri Nov 20 01:17:51 2009 +0000 @@ -60,9 +60,6 @@ slplink = slpmsg->slplink; - if (slpmsg->fp != NULL) - fclose(slpmsg->fp); - purple_imgstore_unref(slpmsg->img); /* We don't want to free the data of the PurpleStoredImage, @@ -96,7 +93,7 @@ /* We can only have one data source at a time. */ g_return_if_fail(slpmsg->buffer == NULL); g_return_if_fail(slpmsg->img == NULL); - g_return_if_fail(slpmsg->fp == NULL); + g_return_if_fail(slpmsg->ft == FALSE); if (body != NULL) slpmsg->buffer = g_memdup(body, size); @@ -112,7 +109,7 @@ /* We can only have one data source at a time. */ g_return_if_fail(slpmsg->buffer == NULL); g_return_if_fail(slpmsg->img == NULL); - g_return_if_fail(slpmsg->fp == NULL); + g_return_if_fail(slpmsg->ft == FALSE); slpmsg->img = purple_imgstore_ref(img); slpmsg->buffer = (guchar *)purple_imgstore_get_data(img);
--- a/libpurple/protocols/msn/slpmsg.h Fri Nov 20 00:35:30 2009 +0000 +++ b/libpurple/protocols/msn/slpmsg.h Fri Nov 20 01:17:51 2009 +0000 @@ -54,7 +54,6 @@ gboolean sip; /**< A flag that states if this is a SIP slp message. */ long flags; - FILE *fp; gboolean ft; PurpleStoredImage *img; guchar *buffer;