/pidgin/main: 0d7ead568881: Merge release-2.x.y
Tomasz Wasilczyk
tomkiewicz at cpw.pidgin.im
Tue Jan 29 09:38:58 EST 2013
Changeset: 0d7ead5688812eb71e557e38ff6de8e712a4f57e
Author: Tomasz Wasilczyk <tomkiewicz at cpw.pidgin.im>
Date: 2013-01-29 15:38 +0100
Branch: default
URL: http://hg.pidgin.im/pidgin/main/rev/0d7ead568881
Description:
Merge release-2.x.y
diffstat:
ChangeLog | 1 +
Makefile.mingw | 1 -
libpurple/plugins/ssl/Makefile.mingw | 1 -
libpurple/plugins/ssl/ssl-nss.c | 10 ----------
libpurple/protocols/gg/lib/common.c | 3 ++-
libpurple/protocols/gg/lib/dcc.c | 1 +
libpurple/protocols/gg/lib/dcc7.c | 5 +++--
libpurple/protocols/gg/lib/libgadu.c | 2 +-
libpurple/protocols/mxit/multimx.c | 2 +-
libpurple/protocols/mxit/protocol.c | 7 ++++++-
libpurple/protocols/mxit/protocol.h | 2 +-
libpurple/protocols/mxit/roster.c | 2 +-
libpurple/protocols/yahoo/libymsg.c | 4 ++--
libpurple/protocols/yahoo/libymsg.h | 2 +-
pidgin/gtkimhtml.c | 4 +++-
pidgin/win32/nsis/pidgin-installer.nsi | 1 -
16 files changed, 23 insertions(+), 25 deletions(-)
diffs (247 lines):
diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -102,6 +102,7 @@ version 2.10.7:
still have a pending invite.
* The buddy's name was not centered vertically in the buddy-list if they
did not have a status-message or mood set.
+ * Fix decoding of font-size changes in the markup of received messages.
Yahoo!:
* Fix a double-free in profile/picture loading code. (Mihai Serban)
diff --git a/Makefile.mingw b/Makefile.mingw
--- a/Makefile.mingw
+++ b/Makefile.mingw
@@ -68,7 +68,6 @@ EXTERNAL_DLLS = \
libssp-0.dll \
libxml2-2.dll \
nss3.dll \
- nssckbi.dll \
nssutil3.dll \
saslANONYMOUS.dll \
saslCRAMMD5.dll \
diff --git a/libpurple/plugins/ssl/Makefile.mingw b/libpurple/plugins/ssl/Makefile.mingw
--- a/libpurple/plugins/ssl/Makefile.mingw
+++ b/libpurple/plugins/ssl/Makefile.mingw
@@ -19,7 +19,6 @@ NEEDED_DLLS = \
$(NSS_TOP)/lib/libplc4.dll \
$(NSS_TOP)/lib/libplds4.dll \
$(NSS_TOP)/lib/nss3.dll \
- $(NSS_TOP)/lib/nssckbi.dll \
$(NSS_TOP)/lib/nssutil3.dll \
$(NSS_TOP)/lib/smime3.dll \
$(NSS_TOP)/lib/softokn3.dll \
diff --git a/libpurple/plugins/ssl/ssl-nss.c b/libpurple/plugins/ssl/ssl-nss.c
--- a/libpurple/plugins/ssl/ssl-nss.c
+++ b/libpurple/plugins/ssl/ssl-nss.c
@@ -125,18 +125,8 @@ static gchar *get_error_text(void)
static void
ssl_nss_init_nss(void)
{
- char *lib;
PR_Init(PR_SYSTEM_THREAD, PR_PRIORITY_NORMAL, 1);
NSS_NoDB_Init(".");
-
- /* TODO: Fix this so autoconf does the work trying to find this lib. */
-#ifndef _WIN32
- lib = g_strdup(LIBDIR "/libnssckbi.so");
-#else
- lib = g_strdup("nssckbi.dll");
-#endif
- SECMOD_AddNewModule("Builtins", lib, 0, 0);
- g_free(lib);
NSS_SetDomesticPolicy();
SSL_CipherPrefSetDefault(TLS_DHE_RSA_WITH_AES_256_CBC_SHA, 1);
diff --git a/libpurple/protocols/gg/lib/common.c b/libpurple/protocols/gg/lib/common.c
--- a/libpurple/protocols/gg/lib/common.c
+++ b/libpurple/protocols/gg/lib/common.c
@@ -78,7 +78,7 @@ char *gg_vsaprintf(const char *format, v
size = 128;
do {
size *= 2;
- if (!(tmp = realloc(buf, size))) {
+ if (!(tmp = realloc(buf, size + 1))) {
free(buf);
return NULL;
}
@@ -268,6 +268,7 @@ int gg_connect(void *addr, int port, int
}
}
+ memset(&sin, 0, sizeof(sin));
sin.sin_port = htons(port);
sin.sin_family = AF_INET;
sin.sin_addr.s_addr = a->s_addr;
diff --git a/libpurple/protocols/gg/lib/dcc.c b/libpurple/protocols/gg/lib/dcc.c
--- a/libpurple/protocols/gg/lib/dcc.c
+++ b/libpurple/protocols/gg/lib/dcc.c
@@ -419,6 +419,7 @@ struct gg_dcc *gg_dcc_socket_create(uin_
port = GG_DEFAULT_DCC_PORT;
while (!bound) {
+ memset(&sin, 0, sizeof(sin));
sin.sin_family = AF_INET;
sin.sin_addr.s_addr = INADDR_ANY;
sin.sin_port = htons(port);
diff --git a/libpurple/protocols/gg/lib/dcc7.c b/libpurple/protocols/gg/lib/dcc7.c
--- a/libpurple/protocols/gg/lib/dcc7.c
+++ b/libpurple/protocols/gg/lib/dcc7.c
@@ -140,7 +140,7 @@ static struct gg_dcc7 *gg_dcc7_session_f
for (tmp = sess->dcc7_list; tmp; tmp = tmp->next) {
if (empty) {
- if (tmp->peer_uin == uin && !tmp->state == GG_STATE_WAITING_FOR_ACCEPT)
+ if (tmp->peer_uin == uin /*&& tmp->state != GG_STATE_WAITING_FOR_ACCEPT*/)
return tmp;
} else {
if (!memcmp(&tmp->cid, &id, sizeof(id)))
@@ -239,6 +239,7 @@ static int gg_dcc7_listen(struct gg_dcc7
return -1;
}
+ memset(&sin, 0, sizeof(sin));
sin.sin_family = AF_INET;
sin.sin_addr.s_addr = addr;
sin.sin_port = htons(port);
@@ -649,7 +650,7 @@ int gg_dcc7_handle_id(struct gg_session
s.uin_to = gg_fix32(tmp->peer_uin);
s.size = gg_fix32(tmp->size);
- strncpy((char*) s.filename, (char*) tmp->filename, GG_DCC7_FILENAME_LEN);
+ memcpy((char*) s.filename, (char*) tmp->filename, GG_DCC7_FILENAME_LEN);
tmp->state = GG_STATE_WAITING_FOR_ACCEPT;
tmp->timeout = GG_DCC7_TIMEOUT_FILE_ACK;
diff --git a/libpurple/protocols/gg/lib/libgadu.c b/libpurple/protocols/gg/lib/libgadu.c
--- a/libpurple/protocols/gg/lib/libgadu.c
+++ b/libpurple/protocols/gg/lib/libgadu.c
@@ -509,7 +509,7 @@ void *gg_recv_packet(struct gg_session *
while (sess->header_done < sizeof(h)) {
ret = gg_read(sess, (char*) &h + sess->header_done, sizeof(h) - sess->header_done);
- gg_debug_session(sess, GG_DEBUG_MISC, "// gg_recv_packet() header recv(%d,%p,%d) = %d\n", sess->fd, &h + sess->header_done, sizeof(h) - sess->header_done, ret);
+ gg_debug_session(sess, GG_DEBUG_MISC, "// gg_recv_packet() header recv(%d,%p,%d) = %d\n", sess->fd, (char*)&h + sess->header_done, sizeof(h) - sess->header_done, ret);
if (!ret) {
errno = ECONNRESET;
diff --git a/libpurple/protocols/mxit/multimx.c b/libpurple/protocols/mxit/multimx.c
--- a/libpurple/protocols/mxit/multimx.c
+++ b/libpurple/protocols/mxit/multimx.c
@@ -514,7 +514,7 @@ void mxit_chat_reject(PurpleConnection *
}
/* Send Subscription Reject to MXit */
- mxit_send_deny_sub(session, multimx->roomid);
+ mxit_send_deny_sub(session, multimx->roomid, NULL);
/* Remove from our list of rooms */
room_remove(session, multimx);
diff --git a/libpurple/protocols/mxit/protocol.c b/libpurple/protocols/mxit/protocol.c
--- a/libpurple/protocols/mxit/protocol.c
+++ b/libpurple/protocols/mxit/protocol.c
@@ -1065,8 +1065,9 @@ void mxit_send_allow_sub( struct MXitSes
*
* @param session The MXit session object
* @param username The username of the contact being denied
+ * @param reason The message describing the reason for the rejection (can be NULL).
*/
-void mxit_send_deny_sub( struct MXitSession* session, const char* username )
+void mxit_send_deny_sub( struct MXitSession* session, const char* username, const char* reason )
{
char data[CP_MAX_PACKET];
int datalen;
@@ -1077,6 +1078,10 @@ void mxit_send_deny_sub( struct MXitSess
username
);
+ /* append reason (if one is set) */
+ if ( reason )
+ datalen += sprintf( data + datalen, "%c%s", CP_FLD_TERM, reason );
+
/* queue packet for transmission */
mxit_queue_packet( session, data, datalen, CP_CMD_DENY );
}
diff --git a/libpurple/protocols/mxit/protocol.h b/libpurple/protocols/mxit/protocol.h
--- a/libpurple/protocols/mxit/protocol.h
+++ b/libpurple/protocols/mxit/protocol.h
@@ -326,7 +326,7 @@ void mxit_send_suggest_search( struct MX
void mxit_send_invite( struct MXitSession* session, const char* username, gboolean mxitid, const char* alias, const char* groupname, const char* message );
void mxit_send_remove( struct MXitSession* session, const char* username );
void mxit_send_allow_sub( struct MXitSession* session, const char* username, const char* alias );
-void mxit_send_deny_sub( struct MXitSession* session, const char* username );
+void mxit_send_deny_sub( struct MXitSession* session, const char* username, const char* reason );
void mxit_send_update_contact( struct MXitSession* session, const char* username, const char* alias, const char* groupname );
void mxit_send_splashclick( struct MXitSession* session, const char* splashid );
void mxit_send_msgevent( struct MXitSession* session, const char* to, const char* id, int event);
diff --git a/libpurple/protocols/mxit/roster.c b/libpurple/protocols/mxit/roster.c
--- a/libpurple/protocols/mxit/roster.c
+++ b/libpurple/protocols/mxit/roster.c
@@ -619,7 +619,7 @@ static void mxit_cb_buddy_deny( const ch
purple_debug_info( MXIT_PLUGIN_ID, "mxit_cb_buddy_deny '%s'\n", invite->contact->username );
/* send a deny subscription packet to MXit */
- mxit_send_deny_sub( invite->session, invite->contact->username );
+ mxit_send_deny_sub( invite->session, invite->contact->username, NULL );
/* remove the invite from our internal invites list */
invite->session->invites = g_list_remove( invite->session->invites, invite->contact );
diff --git a/libpurple/protocols/yahoo/libymsg.c b/libpurple/protocols/yahoo/libymsg.c
--- a/libpurple/protocols/yahoo/libymsg.c
+++ b/libpurple/protocols/yahoo/libymsg.c
@@ -2937,7 +2937,7 @@ static void yahoo_process_audible(Purple
msg = pair->value;
break;
case 232:
- /* weird number (md5 hash?), like 8ebab9094156135f5dcbaccbeee662a5c5fd1420 */
+ /* SHA-1 hash of audible SWF file (eg: 4e8691499d9c0fb8374478ff9720f4a9ea4a4915) */
break;
}
@@ -2958,7 +2958,7 @@ static void yahoo_process_audible(Purple
return;
}
if (id) {
- /* "http://us.dl1.yimg.com/download.yahoo.com/dl/aud/"+locale+"/"+id+".swf" */
+ /* "http://l.yimg.com/pu/dl/aud/"+locale+"/"+id+".swf" */
char **audible_locale = g_strsplit(id, ".", 0);
char *buf = g_strdup_printf(_("[ Audible %s/%s/%s.swf ] %s"), YAHOO_AUDIBLE_URL, audible_locale[1], id, msg);
g_strfreev(audible_locale);
diff --git a/libpurple/protocols/yahoo/libymsg.h b/libpurple/protocols/yahoo/libymsg.h
--- a/libpurple/protocols/yahoo/libymsg.h
+++ b/libpurple/protocols/yahoo/libymsg.h
@@ -61,7 +61,7 @@
#define YAHOOJP_ROOMLIST_URL "http://insider.msg.yahoo.co.jp/ycontent/"
#define YAHOOJP_ROOMLIST_LOCALE "ja"
-#define YAHOO_AUDIBLE_URL "http://us.dl1.yimg.com/download.yahoo.com/dl/aud"
+#define YAHOO_AUDIBLE_URL "http://l.yimg.com/pu/dl/aud"
#define WEBMESSENGER_URL "http://login.yahoo.com/config/login?.src=pg"
diff --git a/pidgin/gtkimhtml.c b/pidgin/gtkimhtml.c
--- a/pidgin/gtkimhtml.c
+++ b/pidgin/gtkimhtml.c
@@ -5267,8 +5267,10 @@ static const gchar *tag_to_html_start(Gt
g_free(name);
if (tmp) {
- g_snprintf(buf, sizeof(buf), "<a href=\"%s\">", tmp);
+ gchar *escaped = purple_markup_escape_text(tmp, -1);
+ g_snprintf(buf, sizeof(buf), "<a href=\"%s\">", escaped);
buf[sizeof(buf)-1] = '\0';
+ g_free(escaped);
return buf;
} else {
return "";
diff --git a/pidgin/win32/nsis/pidgin-installer.nsi b/pidgin/win32/nsis/pidgin-installer.nsi
--- a/pidgin/win32/nsis/pidgin-installer.nsi
+++ b/pidgin/win32/nsis/pidgin-installer.nsi
@@ -643,7 +643,6 @@ Section Uninstall
Delete "$INSTDIR\libymsg.dll"
Delete "$INSTDIR\nss3.dll"
Delete "$INSTDIR\nssutil3.dll"
- Delete "$INSTDIR\nssckbi.dll"
Delete "$INSTDIR\pidgin.dll"
Delete "$INSTDIR\pidgin.exe"
Delete "$INSTDIR\smime3.dll"
More information about the Commits
mailing list