Mercurial > pidgin.yaz
diff libpurple/protocols/oscar/oft.c @ 32692:0f94ec89f0bc
merged from im.pidgin.pidgin
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Mon, 26 Sep 2011 14:57:21 +0900 |
parents | ac6353ffa129 b6defcebfe4b |
children | 4a34689eeb33 |
line wrap: on
line diff
--- a/libpurple/protocols/oscar/oft.c Mon Aug 29 12:59:57 2011 +0900 +++ b/libpurple/protocols/oscar/oft.c Mon Sep 26 14:57:21 2011 +0900 @@ -362,10 +362,10 @@ if (purple_circ_buffer_get_max_read(conn->buffer_outgoing) == 0) { + int fd = conn->fd; conn->sending_data_timer = 0; - conn->xfer->fd = conn->fd; conn->fd = -1; - purple_xfer_start(conn->xfer, conn->xfer->fd, NULL, 0); + purple_xfer_start(conn->xfer, fd, NULL, 0); return FALSE; } @@ -667,9 +667,9 @@ size2 = purple_str_size_to_units(G_MAXUINT32); tmp = g_strdup_printf(_("File %s is %s, which is larger than " "the maximum size of %s."), - xfer->local_filename, size1, size2); + purple_xfer_get_local_filename(xfer), size1, size2); purple_xfer_error(purple_xfer_get_type(xfer), - purple_xfer_get_account(xfer), xfer->who, tmp); + purple_xfer_get_account(xfer), purple_xfer_get_remote_user(xfer), tmp); g_free(size1); g_free(size2); g_free(tmp); @@ -693,16 +693,19 @@ conn->xferdata.cretime = 0; /* yaz */ - f1 = g_filename_display_basename(xfer->local_filename); + f1 = g_filename_display_basename(purple_xfer_get_local_filename(xfer)); f2 = botch_utf(f1, strlen(f1), &dummy); if(f2){ purple_xfer_set_filename(xfer, (char *)f2); } + else { + purple_xfer_set_filename(xfer, (char *)f1); + } g_free(f1); f1 = NULL; g_free(f2); f2 = NULL; - conn->xferdata.name_length = MAX(64, strlen(xfer->filename) + 1); - conn->xferdata.name = (guchar *)g_strndup(xfer->filename, conn->xferdata.name_length - 1); + conn->xferdata.name_length = MAX(64, strlen(purple_xfer_get_filename(xfer)) + 1); + conn->xferdata.name = (guchar *)g_strndup(purple_xfer_get_filename(xfer), conn->xferdata.name_length - 1); peer_oft_checksum_file(conn, xfer, peer_oft_checksum_calculated_cb, G_MAXUINT32);