# HG changeset patch # User Richard Laager # Date 1229112238 0 # Node ID 1260a3fb60f40d464f502bb71d9061c3469cd115 # Parent d1d9d085d62614049da70bac1f5a1c18197a481d# Parent 146ee5c0169602d6681f503266754efc153cb9bf propagate from branch 'im.pidgin.pidgin' (head b8d6086aef6b2e65d86e8ce60220ab7f460d5079) to branch 'im.pidgin.pidgin.next.minor' (head c165595260a2efa0ca23704ada46a303e0412e19) diff -r 146ee5c01696 -r 1260a3fb60f4 COPYRIGHT --- a/COPYRIGHT Fri Dec 12 07:26:20 2008 +0000 +++ b/COPYRIGHT Fri Dec 12 20:03:58 2008 +0000 @@ -207,6 +207,7 @@ Benjamin Kahn Anders Kaseorg Praveen Karadakal +Jaromír Karmazín John Kelm Jochen Kemnade Akuke Kok diff -r 146ee5c01696 -r 1260a3fb60f4 ChangeLog --- a/ChangeLog Fri Dec 12 07:26:20 2008 +0000 +++ b/ChangeLog Fri Dec 12 20:03:58 2008 +0000 @@ -23,6 +23,11 @@ * On MSN, the Games and Office media can now be set and displayed (in addition to the previous Music media). The Media status text now shows the album, if possible. + * Fix use of av_len in perl bindings to fix some off-by-one bugs (Paul + Aurich) + * On ICQ, advertise the ICQ 6 typing capability. This should fix the + reports of typing notifications not working with third-party clients + (Jaromír Karmazín) Gadu-Gadu: * Fix some problems with Gadu-Gadu buddy icons (Adam Strzelecki) @@ -42,6 +47,10 @@ * Send "client-accepts-full-bind-result" attribute during SASL login. This will fix Google Talk login failures if the user configures the wrong domain for his/her account. + * Support new element to indicate no XEP-0084 User Avatar + (Paul Aurich) + * Fix SHA1 avatar checksum errors that occur when one of the bytes in a + checksum begins with 0 (Paul Aurich) Zephyr: * Enable auto-reply, to emulate 'zaway' (Toby Schaffer) @@ -63,7 +72,6 @@ buddylist. (Thanks to Casey Ho) * Fix a crash when closing an authorization minidialog with the X then immediately going offline (Paul Aurich) - * Fix compatibility with old GTK+ yet again Finch: * Allow binding meta+arrow keys for actions. diff -r 146ee5c01696 -r 1260a3fb60f4 ChangeLog.win32 --- a/ChangeLog.win32 Fri Dec 12 07:26:20 2008 +0000 +++ b/ChangeLog.win32 Fri Dec 12 20:03:58 2008 +0000 @@ -1,3 +1,7 @@ +version 2.5.3 (12/??/2008): + * Upgrade SILC to use the 1.1.8 toolkit + * Updated included Meanwhile library to include patch referenced in #7563 + version 2.5.2 (10/19/2008): * Updated GTK+ to 2.12.12 This will resolve an issue with stuff in QQ appearing as "(NULL)" @@ -28,7 +32,7 @@ version 2.4.0 (02/29/2008): * Updated GTK+ to 2.12.8 - * Updated include Meanwhile library to include patches referenced at: + * Updated included Meanwhile library to include patches referenced at: https://sourceforge.net/tracker/?func=detail&atid=656718&aid=1626349&group_id=110565 * Build the xmpp protocol with SASL support (and include Cyrus SASL 2.1.22). diff -r 146ee5c01696 -r 1260a3fb60f4 configure.ac --- a/configure.ac Fri Dec 12 07:26:20 2008 +0000 +++ b/configure.ac Fri Dec 12 20:03:58 2008 +0000 @@ -1159,6 +1159,8 @@ "-Wendif-labels" \ "-Werror-implicit-function-declaration" \ "-Wextra -Wno-sign-compare -Wno-unused-parameter" \ + "-Wformat-security" \ + "-Werror=format-security" \ "-Winit-self" \ "-Wmissing-declarations" \ "-Wmissing-noreturn" \ diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/account.c --- a/libpurple/account.c Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/account.c Fri Dec 12 20:03:58 2008 +0000 @@ -75,6 +75,7 @@ gpointer userdata; PurpleAccountRequestAuthorizationCb auth_cb; PurpleAccountRequestAuthorizationCb deny_cb; + guint ref; } PurpleAccountRequestInfo; static PurpleAccountUiOps *account_ui_ops = NULL; @@ -1211,6 +1212,18 @@ ui_ops->request_add(account, remote_user, id, alias, message); } +static PurpleAccountRequestInfo * +purple_account_request_info_unref(PurpleAccountRequestInfo *info) +{ + if (--info->ref) + return info; + + /* TODO: This will leak info->user_data, but there is no callback to just clean that up */ + g_free(info->user); + g_free(info); + return NULL; +} + static void purple_account_request_close_info(PurpleAccountRequestInfo *info) { @@ -1221,11 +1234,7 @@ if (ops != NULL && ops->close_account_request != NULL) ops->close_account_request(info->ui_handle); - /* TODO: This will leak info->user_data, but there is no callback to just clean that up */ - - g_free(info->user); - g_free(info); - + purple_account_request_info_unref(info); } void @@ -1278,8 +1287,7 @@ purple_signal_emit(purple_accounts_get_handle(), "account-authorization-granted", info->account, info->user); - g_free(info->user); - g_free(info); + purple_account_request_info_unref(info); } static void @@ -1294,8 +1302,7 @@ purple_signal_emit(purple_accounts_get_handle(), "account-authorization-denied", info->account, info->user); - g_free(info->user); - g_free(info); + purple_account_request_info_unref(info); } void * @@ -1332,11 +1339,18 @@ info->deny_cb = deny_cb; info->userdata = user_data; info->user = g_strdup(remote_user); + info->ref = 2; /* We hold an extra ref to make sure info remains valid + if any of the callbacks are called synchronously. We + unref it after the function call */ + info->ui_handle = ui_ops->request_authorize(account, remote_user, id, alias, message, on_list, request_auth_cb, request_deny_cb, info); - handles = g_list_append(handles, info); - return info->ui_handle; + info = purple_account_request_info_unref(info); + if (info) { + handles = g_list_append(handles, info); + return info->ui_handle; + } } return NULL; diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/blist.h --- a/libpurple/blist.h Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/blist.h Fri Dec 12 20:03:58 2008 +0000 @@ -71,7 +71,7 @@ typedef enum { - PURPLE_BLIST_NODE_FLAG_NO_SAVE = 1 << 0, /**< node should not be saved with the buddy list */ + PURPLE_BLIST_NODE_FLAG_NO_SAVE = 1 << 0 /**< node should not be saved with the buddy list */ } PurpleBlistNodeFlags; diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/cmds.h --- a/libpurple/cmds.h Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/cmds.h Fri Dec 12 20:03:58 2008 +0000 @@ -38,7 +38,7 @@ PURPLE_CMD_STATUS_NOT_FOUND, PURPLE_CMD_STATUS_WRONG_ARGS, PURPLE_CMD_STATUS_WRONG_PRPL, - PURPLE_CMD_STATUS_WRONG_TYPE, + PURPLE_CMD_STATUS_WRONG_TYPE } PurpleCmdStatus; /** Commands registered with the core return one of these values when run. @@ -51,7 +51,7 @@ typedef enum _PurpleCmdRet { PURPLE_CMD_RET_OK, /**< Everything's okay; Don't look for another command to call. */ PURPLE_CMD_RET_FAILED, /**< The command failed, but stop looking.*/ - PURPLE_CMD_RET_CONTINUE, /**< Continue, looking for other commands with the same name to call. */ + PURPLE_CMD_RET_CONTINUE /**< Continue, looking for other commands with the same name to call. */ } PurpleCmdRet; #define PURPLE_CMD_FUNC(func) ((PurpleCmdFunc)func) @@ -76,7 +76,7 @@ PURPLE_CMD_P_PLUGIN = 3000, PURPLE_CMD_P_ALIAS = 4000, PURPLE_CMD_P_HIGH = 5000, - PURPLE_CMD_P_VERY_HIGH = 6000, + PURPLE_CMD_P_VERY_HIGH = 6000 } PurpleCmdPriority; /** Flags used to set various properties of commands. Every command should @@ -93,7 +93,7 @@ /** Command is usable only for a particular prpl. */ PURPLE_CMD_FLAG_PRPL_ONLY = 0x04, /** Incorrect arguments to this command should be accepted anyway. */ - PURPLE_CMD_FLAG_ALLOW_WRONG_ARGS = 0x08, + PURPLE_CMD_FLAG_ALLOW_WRONG_ARGS = 0x08 } PurpleCmdFlag; diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/connection.h --- a/libpurple/connection.h Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/connection.h Fri Dec 12 20:03:58 2008 +0000 @@ -44,7 +44,7 @@ PURPLE_CONNECTION_NO_FONTSIZE = 0x0020, /**< Connection does not send/receive font sizes */ PURPLE_CONNECTION_NO_URLDESC = 0x0040, /**< Connection does not support descriptions with links */ PURPLE_CONNECTION_NO_IMAGES = 0x0080, /**< Connection does not support sending of images */ - PURPLE_CONNECTION_ALLOW_CUSTOM_SMILEY = 0x0100, /**< Connection supports sending and receiving custom smileys */ + PURPLE_CONNECTION_ALLOW_CUSTOM_SMILEY = 0x0100 /**< Connection supports sending and receiving custom smileys */ } PurpleConnectionFlags; diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/conversation.h --- a/libpurple/conversation.h Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/conversation.h Fri Dec 12 20:03:58 2008 +0000 @@ -84,7 +84,7 @@ PURPLE_CONV_UPDATE_TITLE, PURPLE_CONV_UPDATE_CHATLEFT, - PURPLE_CONV_UPDATE_FEATURES, /**< The features for a chat have changed */ + PURPLE_CONV_UPDATE_FEATURES /**< The features for a chat have changed */ } PurpleConvUpdateType; @@ -126,7 +126,7 @@ PURPLE_MESSAGE_NOTIFY = 0x2000, /**< Message is a notification */ PURPLE_MESSAGE_NO_LINKIFY = 0x4000, /**< Message should not be auto- linkified @since 2.1.0 */ - PURPLE_MESSAGE_INVISIBLE = 0x8000, /**< Message should not be displayed */ + PURPLE_MESSAGE_INVISIBLE = 0x8000 /**< Message should not be displayed */ } PurpleMessageFlags; /** @@ -139,7 +139,7 @@ PURPLE_CBFLAGS_HALFOP = 0x0002, /**< Half-op */ PURPLE_CBFLAGS_OP = 0x0004, /**< Channel Op or Moderator */ PURPLE_CBFLAGS_FOUNDER = 0x0008, /**< Channel Founder */ - PURPLE_CBFLAGS_TYPING = 0x0010, /**< Currently typing */ + PURPLE_CBFLAGS_TYPING = 0x0010 /**< Currently typing */ } PurpleConvChatBuddyFlags; diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/plugins/perl/common/Account.xs --- a/libpurple/plugins/perl/common/Account.xs Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/plugins/perl/common/Account.xs Fri Dec 12 20:03:58 2008 +0000 @@ -107,7 +107,7 @@ t_GL = NULL; t_len = av_len((AV *)SvRV(status_types)); - for (i = 0; i < t_len; i++) + for (i = 0; i <= t_len; i++) t_GL = g_list_append(t_GL, SvPVutf8_nolen(*av_fetch((AV *)SvRV(status_types), i, 0))); purple_account_set_status_types(account, t_GL); @@ -209,7 +209,7 @@ t_GL = NULL; t_len = av_len((AV *)SvRV(list)); - for (i = 0; i < t_len; i++) + for (i = 0; i <= t_len; i++) t_GL = g_list_append(t_GL, SvPVutf8_nolen(*av_fetch((AV *)SvRV(list), i, 0))); purple_account_add_buddies(account, t_GL); @@ -238,13 +238,13 @@ t_GL1 = NULL; t_len = av_len((AV *)SvRV(A)); - for (i = 0; i < t_len; i++) + for (i = 0; i <= t_len; i++) t_GL1 = g_list_append(t_GL1, SvPVutf8_nolen(*av_fetch((AV *)SvRV(A), i, 0))); t_GL2 = NULL; t_len = av_len((AV *)SvRV(B)); - for (i = 0; i < t_len; i++) + for (i = 0; i <= t_len; i++) t_GL2 = g_list_append(t_GL2, SvPVutf8_nolen(*av_fetch((AV *)SvRV(B), i, 0))); purple_account_remove_buddies(account, t_GL1, t_GL2); diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/plugins/perl/common/AccountOpts.xs --- a/libpurple/plugins/perl/common/AccountOpts.xs Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/plugins/perl/common/AccountOpts.xs Fri Dec 12 20:03:58 2008 +0000 @@ -44,7 +44,7 @@ t_GL = NULL; t_len = av_len((AV *)SvRV(values)); - for (i = 0; i < t_len; i++) + for (i = 0; i <= t_len; i++) t_GL = g_list_append(t_GL, SvPVutf8_nolen(*av_fetch((AV *)SvRV(values), i, 0))); RETVAL = purple_account_option_list_new(text, pref_name, t_GL); @@ -132,7 +132,7 @@ t_GL = NULL; t_len = av_len((AV *)SvRV(values)); - for (i = 0; i < t_len; i++) + for (i = 0; i <= t_len; i++) t_GL = g_list_append(t_GL, SvPVutf8_nolen(*av_fetch((AV *)SvRV(values), i, 0))); purple_account_option_set_list(option, t_GL); diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/plugins/perl/common/Certificate.xs --- a/libpurple/plugins/perl/common/Certificate.xs Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/plugins/perl/common/Certificate.xs Fri Dec 12 20:03:58 2008 +0000 @@ -231,8 +231,8 @@ int len = 0, i = 0; struct cb_data *d = NULL; PPCODE: - len = av_len(cert_chain) + 1; - for(i = 0; i < len; i++) { + len = av_len(cert_chain); + for(i = 0; i <= len; i++) { SV **sv = av_fetch(cert_chain, i, 0); if(!sv || !purple_perl_is_ref_object(*sv)) { g_list_free(l); diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/plugins/perl/common/Conversation.xs --- a/libpurple/plugins/perl/common/Conversation.xs Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/plugins/perl/common/Conversation.xs Fri Dec 12 20:03:58 2008 +0000 @@ -336,7 +336,7 @@ t_GL = NULL; t_len = av_len((AV *)SvRV(users)); - for (i = 0; i < t_len; i++) + for (i = 0; i <= t_len; i++) t_GL = g_list_append(t_GL, SvPVutf8_nolen(*av_fetch((AV *)SvRV(users), i, 0))); for (l = purple_conv_chat_set_users(chat, t_GL); l != NULL; l = l->next) { @@ -374,7 +374,7 @@ t_GL = NULL; t_len = av_len((AV *)SvRV(ignored)); - for (i = 0; i < t_len; i++) + for (i = 0; i <= t_len; i++) t_GL = g_list_append(t_GL, SvPVutf8_nolen(*av_fetch((AV *)SvRV(ignored), i, 0))); for (l = purple_conv_chat_set_ignored(chat, t_GL); l != NULL; l = l->next) { @@ -431,19 +431,19 @@ t_GL_users = NULL; t_len = av_len((AV *)SvRV(users)); - for (i = 0; i < t_len; i++) + for (i = 0; i <= t_len; i++) t_GL_users = g_list_append(t_GL_users, SvPVutf8_nolen(*av_fetch((AV *)SvRV(users), i, 0))); t_GL_flags = NULL; t_len = av_len((AV *)SvRV(flags)); - for (i = 0; i < t_len; i++) + for (i = 0; i <= t_len; i++) t_GL_flags = g_list_append(t_GL_flags, SvPVutf8_nolen(*av_fetch((AV *)SvRV(flags), i, 0))); t_GL_extra_msgs = NULL; t_len = av_len((AV *)SvRV(extra_msgs)); - for (i = 0; i < t_len; i++) + for (i = 0; i <= t_len; i++) t_GL_extra_msgs = g_list_append(t_GL_extra_msgs, SvPVutf8_nolen(*av_fetch((AV *)SvRV(extra_msgs), i, 0))); purple_conv_chat_add_users(chat, t_GL_users, t_GL_extra_msgs, t_GL_flags, new_arrivals); diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/plugins/perl/common/Prefs.xs --- a/libpurple/plugins/perl/common/Prefs.xs Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/plugins/perl/common/Prefs.xs Fri Dec 12 20:03:58 2008 +0000 @@ -53,7 +53,7 @@ t_GL = NULL; t_len = av_len((AV *)SvRV(value)); - for (i = 0; i < t_len; i++) + for (i = 0; i <= t_len; i++) t_GL = g_list_append(t_GL, SvPVutf8_nolen(*av_fetch((AV *)SvRV(value), i, 0))); purple_prefs_add_string_list(name, t_GL); @@ -75,7 +75,7 @@ t_GL = NULL; t_len = av_len((AV *)SvRV(value)); - for (i = 0; i < t_len; i++) + for (i = 0; i <= t_len; i++) t_GL = g_list_append(t_GL, SvPVutf8_nolen(*av_fetch((AV *)SvRV(value), i, 0))); purple_prefs_add_path_list(name, t_GL); @@ -204,7 +204,7 @@ t_GL = NULL; t_len = av_len((AV *)SvRV(value)); - for (i = 0; i < t_len; i++) + for (i = 0; i <= t_len; i++) t_GL = g_list_append(t_GL, SvPVutf8_nolen(*av_fetch((AV *)SvRV(value), i, 0))); purple_prefs_set_string_list(name, t_GL); @@ -226,7 +226,7 @@ t_GL = NULL; t_len = av_len((AV *)SvRV(value)); - for (i = 0; i < t_len; i++) + for (i = 0; i <= t_len; i++) t_GL = g_list_append(t_GL, SvPVutf8_nolen(*av_fetch((AV *)SvRV(value), i, 0))); purple_prefs_set_path_list(name, t_GL); diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/plugins/perl/common/Roomlist.xs --- a/libpurple/plugins/perl/common/Roomlist.xs Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/plugins/perl/common/Roomlist.xs Fri Dec 12 20:03:58 2008 +0000 @@ -80,7 +80,7 @@ t_GL = NULL; t_len = av_len((AV *)SvRV(fields)); - for (i = 0; i < t_len; i++) + for (i = 0; i <= t_len; i++) t_GL = g_list_append(t_GL, SvPVutf8_nolen(*av_fetch((AV *)SvRV(fields), i, 0))); purple_roomlist_set_fields(list, t_GL); diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/plugins/perl/common/Status.xs --- a/libpurple/plugins/perl/common/Status.xs Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/plugins/perl/common/Status.xs Fri Dec 12 20:03:58 2008 +0000 @@ -85,7 +85,7 @@ t_GL = NULL; t_len = av_len((AV *)SvRV(source_list)); - for (i = 0; i < t_len; i++) { + for (i = 0; i <= t_len; i++) { t_GL = g_list_append(t_GL, SvPVutf8_nolen(*av_fetch((AV *)SvRV(source_list), i, 0))); } purple_presence_add_list(presence, t_GL); @@ -381,7 +381,7 @@ t_GL = NULL; t_len = av_len((AV *)SvRV(status_types)); - for (i = 0; i < t_len; i++) { + for (i = 0; i <= t_len; i++) { t_GL = g_list_append(t_GL, SvPVutf8_nolen(*av_fetch((AV *)SvRV(status_types), i, 0))); } RETVAL = (PurpleStatusType *)purple_status_type_find_with_id(t_GL, id); diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/protocols/bonjour/bonjour_ft.c --- a/libpurple/protocols/bonjour/bonjour_ft.c Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/protocols/bonjour/bonjour_ft.c Fri Dec 12 20:03:58 2008 +0000 @@ -411,8 +411,10 @@ PurpleXfer *xfer; const gchar *name = NULL; - if(pc == NULL || packet == NULL || pb == NULL) - return; + g_return_if_fail(pc != NULL); + g_return_if_fail(packet != NULL); + g_return_if_fail(pb != NULL); + bd = (BonjourData*) pc->proto_data; if(bd == NULL) return; @@ -493,8 +495,9 @@ xmlnode *query; BonjourData *bd; - if(pc == NULL || packet == NULL || pb == NULL) - return; + g_return_if_fail(pc != NULL); + g_return_if_fail(packet != NULL); + g_return_if_fail(pb != NULL); bd = (BonjourData*) pc->proto_data; if(bd == NULL) diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/protocols/bonjour/bonjour_ft.h --- a/libpurple/protocols/bonjour/bonjour_ft.h Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/protocols/bonjour/bonjour_ft.h Fri Dec 12 20:03:58 2008 +0000 @@ -27,7 +27,7 @@ typedef enum { XEP_BYTESTREAMS = 1, XEP_IBB = 2, - XEP_UNKNOWN = 4, + XEP_UNKNOWN = 4 } XepSiMode; struct _XepXfer diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/protocols/bonjour/jabber.c --- a/libpurple/protocols/bonjour/jabber.c Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/protocols/bonjour/jabber.c Fri Dec 12 20:03:58 2008 +0000 @@ -77,7 +77,7 @@ }; static void -xep_iq_parse(xmlnode *packet, PurpleConnection *connection, PurpleBuddy *pb); +xep_iq_parse(xmlnode *packet, PurpleBuddy *pb); static BonjourJabberConversation * bonjour_jabber_conv_new(PurpleBuddy *pb, PurpleAccount *account, const char *ip) { @@ -128,7 +128,7 @@ if (contents) { char *bodystart = strchr(contents, '>'); - char *bodyend = strrchr(bodystart, '<'); + char *bodyend = bodystart ? strrchr(bodystart, '<') : NULL; if (bodystart && bodyend && (bodystart + 1) != bodyend) { *bodyend = '\0'; memmove(contents, bodystart + 1, (bodyend - bodystart)); @@ -335,8 +335,8 @@ if (ret == -1 && errno == EAGAIN) ret = 0; else if (ret <= 0) { - PurpleConversation *conv = NULL; - PurpleAccount *account = NULL; + PurpleConversation *conv; + PurpleAccount *account; const char *error = g_strerror(errno); purple_debug_error("bonjour", "Error sending message to buddy %s error: %s\n", @@ -374,7 +374,7 @@ if (!strcmp(packet->name, "message")) _jabber_parse_and_write_message_to_ui(packet, pb); else if(!strcmp(packet->name, "iq")) - xep_iq_parse(packet, NULL, pb); + xep_iq_parse(packet, pb); else purple_debug_warning("bonjour", "Unknown packet: %s\n", packet->name ? packet->name : "(null)"); } @@ -427,39 +427,24 @@ bonjour_parser_process(bconv, message, message_length); } -void bonjour_jabber_stream_ended(BonjourJabberConversation *bconv) { +static void bonjour_jabber_stream_ended(BonjourJabberConversation *bconv) { const gchar *name = NULL; - - if(bconv->pb != NULL) + BonjourBuddy *bb = NULL; + + if(bconv->pb != NULL) { name = purple_buddy_get_name(bconv->pb); + bb = purple_buddy_get_protocol_data(bconv->pb); + } purple_debug_info("bonjour", "Recieved conversation close notification from %s.\n", name ? name : "(unknown)"); - /* Inform the user that the conversation has been closed */ - if (bconv != NULL) { - BonjourBuddy *bb = NULL; + /* Close the socket, clear the watcher and free memory */ + bonjour_jabber_close_conversation(bconv); - if(bconv->pb != NULL) - bb = purple_buddy_get_protocol_data(bconv->pb); -#if 0 - if(bconv->pb != NULL) { - PurpleConversation *conv; - conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, bconv->pb->name, bconv->pb->account); - if (conv != NULL) { - char *tmp = g_strdup_printf(_("%s has closed the conversation."), bconv->pb->name); - purple_conversation_write(conv, NULL, tmp, PURPLE_MESSAGE_SYSTEM, time(NULL)); - g_free(tmp); - } - } -#endif - /* Close the socket, clear the watcher and free memory */ - bonjour_jabber_close_conversation(bconv); - if(bb) - bb->conversation = NULL; - } + if(bb) + bb->conversation = NULL; } - struct _stream_start_data { char *msg; }; @@ -1181,8 +1166,8 @@ check_if_blocked(PurpleBuddy *pb) { gboolean blocked = FALSE; - GSList *l = NULL; - PurpleAccount *acc = NULL; + GSList *l; + PurpleAccount *acc; if(pb == NULL) return FALSE; @@ -1203,27 +1188,22 @@ } static void -xep_iq_parse(xmlnode *packet, PurpleConnection *connection, PurpleBuddy *pb) +xep_iq_parse(xmlnode *packet, PurpleBuddy *pb) { - xmlnode *child = NULL; - - if(packet == NULL || pb == NULL) - return; - - if(connection == NULL) { - PurpleAccount *account = purple_buddy_get_account(pb); - - if(account != NULL) - connection = purple_account_get_connection(account); - } + xmlnode *child; + PurpleAccount *account; + PurpleConnection *gc; if(check_if_blocked(pb)) return; + account = purple_buddy_get_account(pb); + gc = purple_account_get_connection(account); + if ((child = xmlnode_get_child(packet, "si")) || (child = xmlnode_get_child(packet, "error"))) - xep_si_parse(connection, packet, pb); + xep_si_parse(gc, packet, pb); else - xep_bytestreams_parse(connection, packet, pb); + xep_bytestreams_parse(gc, packet, pb); } int diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/protocols/bonjour/jabber.h --- a/libpurple/protocols/bonjour/jabber.h Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/protocols/bonjour/jabber.h Fri Dec 12 20:03:58 2008 +0000 @@ -79,8 +79,6 @@ void bonjour_jabber_stream_started(BonjourJabberConversation *bconv); -void bonjour_jabber_stream_ended(BonjourJabberConversation *bconv); - void bonjour_jabber_process_packet(PurpleBuddy *pb, xmlnode *packet); void bonjour_jabber_stop(BonjourJabber *data); diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/protocols/jabber/auth.c --- a/libpurple/protocols/jabber/auth.c Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/protocols/jabber/auth.c Fri Dec 12 20:03:58 2008 +0000 @@ -613,9 +613,7 @@ } else if(!strcmp(type, "result")) { query = xmlnode_get_child(packet, "query"); if(js->stream_id && xmlnode_get_child(query, "digest")) { - unsigned char hashval[20]; - char *s, h[41], *p; - int i; + char *s, *hash; iq = jabber_iq_new_query(js, JABBER_IQ_SET, "jabber:iq:auth"); query = xmlnode_get_child(iq->node, "query"); @@ -626,14 +624,9 @@ x = xmlnode_new_child(query, "digest"); s = g_strdup_printf("%s%s", js->stream_id, pw); - - purple_cipher_digest_region("sha1", (guchar *)s, strlen(s), - sizeof(hashval), hashval, NULL); - - p = h; - for(i=0; i<20; i++, p+=2) - snprintf(p, 3, "%02x", hashval[i]); - xmlnode_insert_data(x, h, -1); + hash = jabber_calculate_data_sha1sum(s, strlen(s)); + xmlnode_insert_data(x, hash, -1); + g_free(hash); g_free(s); jabber_iq_set_callback(iq, auth_old_result_cb, NULL); jabber_iq_send(iq); diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/protocols/jabber/buddy.c --- a/libpurple/protocols/jabber/buddy.c Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/protocols/jabber/buddy.c Fri Dec 12 20:03:58 2008 +0000 @@ -19,7 +19,6 @@ * */ #include "internal.h" -#include "cipher.h" #include "debug.h" #include "imgstore.h" #include "prpl.h" @@ -451,9 +450,6 @@ gsize avatar_len; xmlnode *photo, *binval, *type; gchar *enc; - int i; - unsigned char hashval[20]; - char *p, hash[41]; if(!vc_node) { vc_node = xmlnode_new("vCard"); @@ -473,16 +469,7 @@ binval = xmlnode_new_child(photo, "BINVAL"); enc = purple_base64_encode(avatar_data, avatar_len); - purple_cipher_digest_region("sha1", avatar_data, - avatar_len, sizeof(hashval), - hashval, NULL); - - purple_imgstore_unref(img); - - p = hash; - for(i=0; i<20; i++, p+=2) - snprintf(p, 3, "%02x", hashval[i]); - js->avatar_hash = g_strdup(hash); + js->avatar_hash = jabber_calculate_data_sha1sum(avatar_data, avatar_len); xmlnode_insert_data(binval, enc, -1); g_free(enc); @@ -545,19 +532,9 @@ char *lengthstring, *widthstring, *heightstring; /* compute the sha1 hash */ - PurpleCipherContext *ctx; - unsigned char digest[20]; - char *hash; + char *hash = jabber_calculate_data_sha1sum(purple_imgstore_get_data(img), purple_imgstore_get_size(img)); char *base64avatar; - ctx = purple_cipher_context_new_by_name("sha1", NULL); - purple_cipher_context_append(ctx, purple_imgstore_get_data(img), purple_imgstore_get_size(img)); - purple_cipher_context_digest(ctx, sizeof(digest), digest, NULL); - purple_cipher_context_destroy(ctx); - - /* convert digest to a string */ - hash = g_strdup_printf("%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x",digest[0],digest[1],digest[2],digest[3],digest[4],digest[5],digest[6],digest[7],digest[8],digest[9],digest[10],digest[11],digest[12],digest[13],digest[14],digest[15],digest[16],digest[17],digest[18],digest[19]); - publish = xmlnode_new("publish"); xmlnode_set_attrib(publish,"node",AVATARNAMESPACEDATA); @@ -1407,31 +1384,25 @@ (bintext = xmlnode_get_data(child))) { gsize size; guchar *data; - int i; - unsigned char hashval[20]; - char *p, hash[41]; gboolean photo = (strcmp(child->name, "PHOTO") == 0); data = purple_base64_decode(bintext, &size); if (data) { char *img_text; + char *hash; jbi->vcard_imgids = g_slist_prepend(jbi->vcard_imgids, GINT_TO_POINTER(purple_imgstore_add_with_id(g_memdup(data, size), size, "logo.png"))); img_text = g_strdup_printf("", GPOINTER_TO_INT(jbi->vcard_imgids->data)); purple_notify_user_info_add_pair(user_info, (photo ? _("Photo") : _("Logo")), img_text); - purple_cipher_digest_region("sha1", (guchar *)data, size, - sizeof(hashval), hashval, NULL); - p = hash; - for(i=0; i<20; i++, p+=2) - snprintf(p, 3, "%02x", hashval[i]); - + hash = jabber_calculate_data_sha1sum(data, size); purple_buddy_icons_set_for_user(js->gc->account, bare_jid, data, size, hash); - g_free(bintext); + g_free(hash); g_free(img_text); } + g_free(bintext); } } g_free(text); @@ -1525,9 +1496,12 @@ purple_buddy_icons_set_for_user(purple_connection_get_account(js->gc), from, NULL, 0, NULL); } else { xmlnode *info, *goodinfo = NULL; - + gboolean has_children = FALSE; + /* iterate over all info nodes to get one we can use */ for(info = metadata->child; info; info = info->next) { + if(info->type == XMLNODE_TYPE_TAG) + has_children = TRUE; if(info->type == XMLNODE_TYPE_TAG && !strcmp(info->name,"info")) { const char *type = xmlnode_get_attrib(info,"type"); const char *id = xmlnode_get_attrib(info,"id"); @@ -1542,7 +1516,9 @@ goodinfo = info; } } - if(goodinfo) { + if(has_children == FALSE) { + purple_buddy_icons_set_for_user(purple_connection_get_account(js->gc), from, NULL, 0, NULL); + } else if(goodinfo) { const char *url = xmlnode_get_attrib(goodinfo, "url"); const char *id = xmlnode_get_attrib(goodinfo,"id"); diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/protocols/jabber/jutil.c --- a/libpurple/protocols/jabber/jutil.c Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/protocols/jabber/jutil.c Fri Dec 12 20:03:58 2008 +0000 @@ -20,7 +20,9 @@ */ #include "internal.h" #include "account.h" +#include "cipher.h" #include "conversation.h" +#include "debug.h" #include "server.h" #include "util.h" #include "xmlnode.h" @@ -236,3 +238,29 @@ return NULL; } +/* The same as purple_util_get_image_checksum, but guaranteed to remain SHA1 */ +char * +jabber_calculate_data_sha1sum(gconstpointer data, size_t len) +{ + PurpleCipherContext *context; + static gchar digest[41]; + + context = purple_cipher_context_new_by_name("sha1", NULL); + if (context == NULL) + { + purple_debug_error("jabber", "Could not find sha1 cipher\n"); + g_return_val_if_reached(NULL); + } + + /* Hash the data */ + purple_cipher_context_append(context, data, len); + if (!purple_cipher_context_digest_to_str(context, sizeof(digest), digest, NULL)) + { + purple_debug_error("jabber", "Failed to get SHA-1 digest.\n"); + g_return_val_if_reached(NULL); + } + purple_cipher_context_destroy(context); + + return g_strdup(digest); +} + diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/protocols/jabber/jutil.h --- a/libpurple/protocols/jabber/jutil.h Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/protocols/jabber/jutil.h Fri Dec 12 20:03:58 2008 +0000 @@ -42,4 +42,5 @@ PurpleConversation *jabber_find_unnormalized_conv(const char *name, PurpleAccount *account); +char *jabber_calculate_data_sha1sum(gconstpointer data, size_t len); #endif /* _PURPLE_JABBER_JUTIL_H_ */ diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/protocols/jabber/presence.c --- a/libpurple/protocols/jabber/presence.c Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/protocols/jabber/presence.c Fri Dec 12 20:03:58 2008 +0000 @@ -21,7 +21,6 @@ #include "internal.h" #include "account.h" -#include "cipher.h" #include "conversation.h" #include "debug.h" #include "notify.h" @@ -349,19 +348,12 @@ (( (binval = xmlnode_get_child(photo, "BINVAL")) && (text = xmlnode_get_data(binval))) || (text = xmlnode_get_data(photo)))) { - unsigned char hashval[20]; - char hash[41], *p; - int i; + char *hash; data = purple_base64_decode(text, &size); - - purple_cipher_digest_region("sha1", data, size, - sizeof(hashval), hashval, NULL); - p = hash; - for(i=0; i<20; i++, p+=2) - snprintf(p, 3, "%02x", hashval[i]); - + hash = jabber_calculate_data_sha1sum(data, size); purple_buddy_icons_set_for_user(js->gc->account, from, data, size, hash); + g_free(hash); g_free(text); } } diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/protocols/jabber/si.c --- a/libpurple/protocols/jabber/si.c Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/protocols/jabber/si.c Fri Dec 12 20:03:58 2008 +0000 @@ -23,7 +23,6 @@ #include "internal.h" #include "blist.h" -#include "cipher.h" #include "debug.h" #include "ft.h" #include "request.h" @@ -183,9 +182,6 @@ { JabberSIXfer *jsx = xfer->data; JabberBytestreamsStreamhost *streamhost; - char *dstaddr, *p; - int i; - unsigned char hashval[20]; JabberID *dstjid; if(!jsx->streamhosts) { @@ -221,6 +217,7 @@ /* TODO: Deal with zeroconf */ if(dstjid != NULL && streamhost->host && streamhost->port > 0) { + char *dstaddr, *hash; jsx->gpi = purple_proxy_info_new(); purple_proxy_info_set_type(jsx->gpi, PURPLE_PROXY_SOCKS5); purple_proxy_info_set_host(jsx->gpi, streamhost->host); @@ -234,17 +231,13 @@ dstaddr = g_strdup_printf("%s%s@%s/%s%s@%s/%s", jsx->stream_id, dstjid->node, dstjid->domain, dstjid->resource, jsx->js->user->node, jsx->js->user->domain, jsx->js->user->resource); - purple_cipher_digest_region("sha1", (guchar *)dstaddr, strlen(dstaddr), - sizeof(hashval), hashval, NULL); - g_free(dstaddr); - dstaddr = g_malloc(41); - p = dstaddr; - for(i=0; i<20; i++, p+=2) - snprintf(p, 3, "%02x", hashval[i]); + /* Per XEP-0065, the 'host' must be SHA1(SID + from JID + to JID) */ + hash = jabber_calculate_data_sha1sum(dstaddr, strlen(dstaddr)); jsx->connect_data = purple_proxy_connect_socks5(NULL, jsx->gpi, - dstaddr, 0, + hash, 0, jabber_si_bytestreams_connect_cb, xfer); + g_free(hash); g_free(dstaddr); /* When selecting a streamhost, timeout after STREAMHOST_CONNECT_TIMEOUT seconds, otherwise it takes forever */ @@ -361,11 +354,9 @@ { PurpleXfer *xfer = data; JabberSIXfer *jsx = xfer->data; - int i; char buffer[256]; int len; - char *dstaddr, *p; - unsigned char hashval[20]; + char *dstaddr, *hash; const char *host; purple_debug_info("jabber", "in jabber_si_xfer_bytestreams_send_read_again_cb\n"); @@ -421,23 +412,20 @@ jsx->js->user->node, jsx->js->user->domain, jsx->js->user->resource, xfer->who); - purple_cipher_digest_region("sha1", (guchar *)dstaddr, strlen(dstaddr), - sizeof(hashval), hashval, NULL); - g_free(dstaddr); - dstaddr = g_malloc(41); - p = dstaddr; - for(i=0; i<20; i++, p+=2) - snprintf(p, 3, "%02x", hashval[i]); + /* Per XEP-0065, the 'host' must be SHA1(SID + from JID + to JID) */ + hash = jabber_calculate_data_sha1sum(dstaddr, strlen(dstaddr)); - if(jsx->rxqueue[4] != 40 || strncmp(dstaddr, jsx->rxqueue+5, 40) || + if(jsx->rxqueue[4] != 40 || strncmp(hash, jsx->rxqueue+5, 40) || jsx->rxqueue[45] != 0x00 || jsx->rxqueue[46] != 0x00) { purple_debug_error("jabber", "someone connected with the wrong info!\n"); close(source); purple_xfer_cancel_remote(xfer); + g_free(hash); g_free(dstaddr); return; } + g_free(hash); g_free(dstaddr); g_free(jsx->rxqueue); diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/protocols/msn/contact.c --- a/libpurple/protocols/msn/contact.c Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/protocols/msn/contact.c Fri Dec 12 20:03:58 2008 +0000 @@ -870,7 +870,7 @@ gpointer data) { MsnCallbackState *state = data; - xmlnode *faultcode; + xmlnode *fault; char *faultcode_str; if (resp == NULL) { @@ -880,9 +880,9 @@ return; } - faultcode = xmlnode_get_child(resp->xml, "Body/Fault/faultcode"); + fault = xmlnode_get_child(resp->xml, "Body/Fault"); - if (faultcode == NULL) { + if (fault == NULL) { /* No errors */ if (state->cb) ((MsnSoapCallback)state->cb)(req, resp, data); @@ -890,7 +890,7 @@ return; } - faultcode_str = xmlnode_get_data(faultcode); + faultcode_str = xmlnode_get_data(xmlnode_get_child(fault, "faultcode")); if (faultcode_str && g_str_equal(faultcode_str, "q0:BadContextToken")) { purple_debug_info("msn", @@ -903,12 +903,15 @@ } else { - /* We don't know how to respond to this faultcode, so just log it */ - /* XXX: Probably should notify the user or undo the change or something? */ - char *str = xmlnode_to_str(xmlnode_get_child(resp->xml, "Body/Fault"), NULL); - purple_debug_error("msn", "Operation {%s} Failed, SOAP Fault was: %s\n", - msn_contact_operation_str(state->action), str); - g_free(str); + if (state->cb) { + ((MsnSoapCallback)state->cb)(req, resp, data); + } else { + /* We don't know how to respond to this faultcode, so log it */ + char *str = xmlnode_to_str(fault, NULL); + purple_debug_error("msn", "Operation {%s} Failed, SOAP Fault was: %s\n", + msn_contact_operation_str(state->action), str); + g_free(str); + } msn_callback_state_free(state); } @@ -943,21 +946,44 @@ MsnUser *user; xmlnode *guid; + xmlnode *fault; + g_return_if_fail(session != NULL); + userlist = session->userlist; + + fault = xmlnode_get_child(resp->xml, "Body/Fault"); + if (fault != NULL) { + char *errorcode = xmlnode_get_data(xmlnode_get_child(fault, "detail/errorcode")); + if (errorcode && !strcmp(errorcode, "EmailDomainIsFederated")) { + /* Do something special! */ + purple_debug_error("msn", "Contact is from a federated domain, but don't know what to do yet!\n"); - userlist = session->userlist; + } else if (errorcode && !strcmp(errorcode, "InvalidPassportUser")) { + PurpleBuddy *buddy = purple_find_buddy(session->account, state->who); + char *str = g_strdup_printf(_("Unable to add \"%s\"."), state->who); + purple_notify_error(state->session, _("Buddy Add error"), str, + _("The username specified does not exist.")); + g_free(str); + msn_userlist_rem_buddy(userlist, state->who); + if (buddy != NULL) + purple_blist_remove_buddy(buddy); + + } else { + /* We don't know how to respond to this faultcode, so log it */ + char *fault_str = xmlnode_to_str(fault, NULL); + if (fault_str != NULL) { + purple_debug_error("msn", "Operation {%s} Failed, SOAP Fault was: %s\n", + msn_contact_operation_str(state->action), fault_str); + g_free(fault_str); + } + } + return; + } purple_debug_info("msn", "Contact added successfully\n"); - /* the code this block is replacing didn't send ADL for yahoo contacts, - * but i haven't confirmed this is WLM's behaviour wrt yahoo contacts - */ - if ( !msn_user_is_yahoo(session->account, state->who) ) { - msn_userlist_add_buddy_to_list(userlist, state->who, MSN_LIST_AL); - msn_userlist_add_buddy_to_list(userlist, state->who, MSN_LIST_FL); - } - - msn_notification_send_fqy(session, state->who); + msn_userlist_add_buddy_to_list(userlist, state->who, MSN_LIST_AL); + msn_userlist_add_buddy_to_list(userlist, state->who, MSN_LIST_FL); user = msn_userlist_find_add_user(userlist, state->who, state->who); msn_user_add_group_id(user, state->guid); @@ -976,6 +1002,7 @@ void msn_add_contact(MsnSession *session, MsnCallbackState *state, const char *passport) { + MsnUser *user; gchar *body = NULL; gchar *contact_xml = NULL; @@ -993,7 +1020,21 @@ purple_debug_info("msn", "Adding contact %s to contact list\n", passport); - contact_xml = g_strdup_printf(MSN_CONTACT_XML, passport); + user = msn_userlist_find_user(session->userlist, passport); + if (user == NULL) { + purple_debug_warning("msn", "Unable to retrieve user %s from the userlist!\n", passport); + return; /* guess this never happened! */ + } + + if (user->networkid != MSN_NETWORK_PASSPORT) { + contact_xml = g_strdup_printf(MSN_CONTACT_EMAIL_XML, + user->networkid == MSN_NETWORK_YAHOO ? + "Messenger2" : + "Messenger3", + passport, 0); + } else { + contact_xml = g_strdup_printf(MSN_CONTACT_XML, passport); + } body = g_strdup_printf(MSN_ADD_CONTACT_TEMPLATE, contact_xml); state->body = xmlnode_from_str(body, -1); @@ -1011,11 +1052,41 @@ gpointer data) { MsnCallbackState *state = data; + MsnSession *session = state->session; MsnUserList *userlist; + xmlnode *fault; + + g_return_if_fail(session != NULL); + userlist = session->userlist; + + fault = xmlnode_get_child(resp->xml, "Body/Fault"); + if (fault != NULL) { + char *errorcode = xmlnode_get_data(xmlnode_get_child(fault, "detail/errorcode")); + if (errorcode && !strcmp(errorcode, "EmailDomainIsFederated")) { + /* Do something special! */ + purple_debug_error("msn", "Contact is from a federated domain, but don't know what to do yet!\n"); - g_return_if_fail(data != NULL); + } else if (errorcode && !strcmp(errorcode, "InvalidPassportUser")) { + PurpleBuddy *buddy = purple_find_buddy(session->account, state->who); + char *str = g_strdup_printf(_("Unable to add \"%s\"."), state->who); + purple_notify_error(session, _("Buddy Add error"), str, + _("The username specified does not exist.")); + g_free(str); + msn_userlist_rem_buddy(userlist, state->who); + if (buddy != NULL) + purple_blist_remove_buddy(buddy); - userlist = state->session->userlist; + } else { + /* We don't know how to respond to this faultcode, so log it */ + char *fault_str = xmlnode_to_str(fault, NULL); + if (fault_str != NULL) { + purple_debug_error("msn", "Operation {%s} Failed, SOAP Fault was: %s\n", + msn_contact_operation_str(state->action), fault_str); + g_free(fault_str); + } + } + return; + } if (msn_userlist_add_buddy_to_group(userlist, state->who, state->new_group_name)) { @@ -1036,11 +1107,8 @@ g_free(uid); } - if ( !msn_user_is_yahoo(state->session->account, state->who) ) { - msn_userlist_add_buddy_to_list(userlist, state->who, MSN_LIST_AL); - msn_userlist_add_buddy_to_list(userlist, state->who, MSN_LIST_FL); - } - msn_notification_send_fqy(state->session, state->who); + msn_userlist_add_buddy_to_list(userlist, state->who, MSN_LIST_AL); + msn_userlist_add_buddy_to_list(userlist, state->who, MSN_LIST_FL); if (msn_userlist_user_is_in_list(user, MSN_LIST_PL)) { msn_del_contact_from_list(state->session, NULL, state->who, MSN_LIST_PL); @@ -1095,8 +1163,14 @@ return; /* guess this never happened! */ } - if (user != NULL && user->uid != NULL) { + if (user->uid != NULL) { contact_xml = g_strdup_printf(MSN_CONTACT_ID_XML, user->uid); + } else if (user->networkid != MSN_NETWORK_PASSPORT) { + contact_xml = g_strdup_printf(MSN_CONTACT_EMAIL_XML, + user->networkid == MSN_NETWORK_YAHOO ? + "Messenger2" : + "Messenger3", + passport, 0); } else { contact_xml = g_strdup_printf(MSN_CONTACT_XML, passport); } @@ -1120,6 +1194,17 @@ MsnCallbackState *state = data; MsnUserList *userlist = state->session->userlist; MsnUser *user = msn_userlist_find_user_with_id(userlist, state->uid); + xmlnode *fault; + + /* We don't know how to respond to this faultcode, so log it */ + fault = xmlnode_get_child(resp->xml, "Body/Fault"); + if (fault != NULL) { + char *fault_str = xmlnode_to_str(fault, NULL); + purple_debug_error("msn", "Operation {%s} Failed, SOAP Fault was: %s\n", + msn_contact_operation_str(state->action), fault_str); + g_free(fault_str); + return; + } purple_debug_info("msn", "Delete contact successful\n"); @@ -1140,8 +1225,8 @@ contact_id_xml = g_strdup_printf(MSN_CONTACT_ID_XML, user->uid); purple_debug_info("msn", "Deleting contact with contactId: %s\n", user->uid); } else { - contact_id_xml = g_strdup_printf(MSN_CONTACT_XML, user->passport); - purple_debug_info("msn", "Deleting contact with passport: %s\n", user->passport); + purple_debug_info("msn", "Unable to delete contact %s without a ContactId\n", user->passport); + return; } state = msn_callback_state_new(session); @@ -1165,6 +1250,17 @@ gpointer data) { MsnCallbackState *state = data; + xmlnode *fault; + + /* We don't know how to respond to this faultcode, so log it */ + fault = xmlnode_get_child(resp->xml, "Body/Fault"); + if (fault != NULL) { + char *fault_str = xmlnode_to_str(fault, NULL); + purple_debug_error("msn", "Operation {%s} Failed, SOAP Fault was: %s\n", + msn_contact_operation_str(state->action), fault_str); + g_free(fault_str); + return; + } if (msn_userlist_rem_buddy_from_group(state->session->userlist, state->who, state->old_group_name)) { @@ -1235,6 +1331,19 @@ msn_update_contact_read_cb(MsnSoapMessage *req, MsnSoapMessage *resp, gpointer data) { + MsnCallbackState *state = (MsnCallbackState *)data; + xmlnode *fault; + + /* We don't know how to respond to this faultcode, so log it */ + fault = xmlnode_get_child(resp->xml, "Body/Fault"); + if (fault != NULL) { + char *fault_str = xmlnode_to_str(fault, NULL); + purple_debug_error("msn", "Operation {%s} Failed, SOAP Fault was: %s\n", + msn_contact_operation_str(state->action), fault_str); + g_free(fault_str); + return; + } + purple_debug_info("msn", "Contact updated successfully\n"); } @@ -1312,6 +1421,17 @@ { MsnCallbackState *state = data; MsnSession *session = state->session; + xmlnode *fault; + + /* We don't know how to respond to this faultcode, so log it */ + fault = xmlnode_get_child(resp->xml, "Body/Fault"); + if (fault != NULL) { + char *fault_str = xmlnode_to_str(fault, NULL); + purple_debug_error("msn", "Operation {%s} Failed, SOAP Fault was: %s\n", + msn_contact_operation_str(state->action), fault_str); + g_free(fault_str); + return; + } purple_debug_info("msn", "Contact %s deleted successfully from %s list on server!\n", state->who, MsnMemberRole[state->list_id]); @@ -1339,10 +1459,13 @@ const gchar *passport, const MsnListId list) { gchar *body = NULL, *member = NULL; + const char *type = "PassportMember"; + gchar *federate = NULL; MsnSoapPartnerScenario partner_scenario; MsnUser *user; g_return_if_fail(session != NULL); + g_return_if_fail(session->userlist != NULL); g_return_if_fail(passport != NULL); g_return_if_fail(list < 5); @@ -1354,21 +1477,27 @@ msn_callback_state_set_list_id(state, list); msn_callback_state_set_who(state, passport); + user = msn_userlist_find_user(session->userlist, passport); + if (user && user->networkid != MSN_NETWORK_PASSPORT) { + type = "EmailMember"; + federate = g_strdup_printf(MSN_MEMBER_FEDERATED_ANNOTATION_XML, + user->networkid); + } + if (list == MSN_LIST_PL) { - g_return_if_fail(session->userlist != NULL); - - user = msn_userlist_find_user(session->userlist, passport); - partner_scenario = MSN_PS_CONTACT_API; - member = g_strdup_printf(MSN_MEMBER_MEMBERSHIPID_XML, user->membership_id[MSN_LIST_PL]); + member = g_strdup_printf(MSN_MEMBER_MEMBERSHIPID_XML, + type, user->membership_id[MSN_LIST_PL], + federate ? federate : ""); } else { /* list == MSN_LIST_AL || list == MSN_LIST_BL */ partner_scenario = MSN_PS_BLOCK_UNBLOCK; - - member = g_strdup_printf(MSN_MEMBER_PASSPORT_XML, passport); + member = g_strdup_printf(MSN_MEMBER_PASSPORT_XML, + type, passport, + federate ? federate : ""); } - body = g_strdup_printf(MSN_CONTACT_DELECT_FROM_LIST_TEMPLATE, + body = g_strdup_printf(MSN_CONTACT_DELETE_FROM_LIST_TEMPLATE, MsnSoapPartnerScenarioText[partner_scenario], MsnMemberRole[list], member); @@ -1378,6 +1507,7 @@ state->cb = msn_del_contact_from_list_read_cb; msn_contact_request(state); + g_free(federate); g_free(member); g_free(body); } @@ -1387,8 +1517,18 @@ gpointer data) { MsnCallbackState *state = data; + xmlnode *fault; - g_return_if_fail(state != NULL); + /* We don't know how to respond to this faultcode, so log it */ + fault = xmlnode_get_child(resp->xml, "Body/Fault"); + if (fault != NULL) { + char *fault_str = xmlnode_to_str(fault, NULL); + purple_debug_error("msn", "Operation {%s} Failed, SOAP Fault was: %s\n", + msn_contact_operation_str(state->action), fault_str); + g_free(fault_str); + return; + } + g_return_if_fail(state->session != NULL); purple_debug_info("msn", "Contact %s added successfully to %s list on server!\n", state->who, MsnMemberRole[state->list_id]); @@ -1415,7 +1555,10 @@ const gchar *passport, const MsnListId list) { gchar *body = NULL, *member = NULL; + const char *type = "PassportMember"; + gchar *federate = NULL; MsnSoapPartnerScenario partner_scenario; + MsnUser *user; g_return_if_fail(session != NULL); g_return_if_fail(passport != NULL); @@ -1429,9 +1572,16 @@ msn_callback_state_set_list_id(state, list); msn_callback_state_set_who(state, passport); - partner_scenario = (list == MSN_LIST_RL) ? MSN_PS_CONTACT_API : MSN_PS_BLOCK_UNBLOCK; + user = msn_userlist_find_user(session->userlist, passport); + if (user && user->networkid != MSN_NETWORK_PASSPORT) { + type = "EmailMember"; + federate = g_strdup_printf(MSN_MEMBER_FEDERATED_ANNOTATION_XML, + user->networkid); + } - member = g_strdup_printf(MSN_MEMBER_PASSPORT_XML, state->who); + partner_scenario = (list == MSN_LIST_RL) ? MSN_PS_CONTACT_API : MSN_PS_BLOCK_UNBLOCK; + member = g_strdup_printf(MSN_MEMBER_PASSPORT_XML, + type, state->who, federate ? federate : ""); body = g_strdup_printf(MSN_CONTACT_ADD_TO_LIST_TEMPLATE, MsnSoapPartnerScenarioText[partner_scenario], @@ -1443,6 +1593,7 @@ state->cb = msn_add_contact_to_list_read_cb; msn_contact_request(state); + g_free(federate); g_free(member); g_free(body); } @@ -1482,6 +1633,17 @@ MsnCallbackState *state = data; MsnSession *session; MsnUserList *userlist; + xmlnode *fault; + + /* We don't know how to respond to this faultcode, so log it */ + fault = xmlnode_get_child(resp->xml, "Body/Fault"); + if (fault != NULL) { + char *fault_str = xmlnode_to_str(fault, NULL); + purple_debug_error("msn", "Operation {%s} Failed, SOAP Fault was: %s\n", + msn_contact_operation_str(state->action), fault_str); + g_free(fault_str); + return; + } purple_debug_info("msn", "Group request successful.\n"); @@ -1661,3 +1823,4 @@ g_free(escaped_group_name); g_free(body); } + diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/protocols/msn/contact.h --- a/libpurple/protocols/msn/contact.h Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/protocols/msn/contact.h Fri Dec 12 20:03:58 2008 +0000 @@ -211,6 +211,27 @@ ""\ "" +#define MSN_CONTACT_ID_XML \ + ""\ + "%s"\ + "" + +#define MSN_CONTACT_EMAIL_XML \ + ""\ + ""\ + ""\ + ""\ + "%s"\ + "%s"\ + "true"\ + "%d"\ + "false"\ + ""\ + ""\ + ""\ + ""\ + "" + #define MSN_ADD_CONTACT_TEMPLATE ""\ "%s" #define MSN_DEL_CONTACT_TEMPLATE ""\ ""\ + ""\ "Passport"\ "Accepted"\ "%s"\ + "%s"\ "" #define MSN_MEMBER_MEMBERSHIPID_XML \ - ""\ + ""\ "Passport"\ "%u"\ "Accepted"\ + "%s"\ "" +#define MSN_MEMBER_FEDERATED_ANNOTATION_XML \ + ""\ + ""\ + "MSN.IM.BuddyType"\ + "%02d:"\ + ""\ + "" + /* first delete contact from allow list */ -#define MSN_CONTACT_DELECT_FROM_LIST_TEMPLATE ""\ +#define MSN_CONTACT_DELETE_FROM_LIST_TEMPLATE ""\ "fl_users_count >= 150) - { - purple_debug_info("msn", "Too many buddies\n"); - /* Buddy list full */ - /* TODO: purple should be notified of this */ - return; - } -#endif - /* XXX - Would group ever be NULL here? I don't think so... * shx: Yes it should; MSN handles non-grouped buddies, and this is only * internal. */ - msn_userlist_add_buddy(userlist, who, gname); + if (msn_userlist_find_user(userlist, who) != NULL) { + /* We already know this buddy. This function takes care of users + already in the list and stuff... */ + msn_userlist_add_buddy(userlist, who, gname); + } else { + /* We need to check the network for this buddy first */ + msn_userlist_save_pending_buddy(userlist, who, gname : NULL); + msn_notification_send_fqy(session, who); + } } static void @@ -1853,7 +1850,7 @@ if ((alias = purple_buddy_get_server_alias(b)) != NULL) { char *nicktext = g_markup_escape_text(alias, -1); - tmp = g_strdup_printf("%s
", nicktext); + tmp = g_strdup_printf("%s", nicktext); purple_notify_user_info_add_pair(user_info, _("Nickname"), tmp); g_free(tmp); g_free(nicktext); @@ -1959,9 +1956,8 @@ if (error_message != NULL || url_text == NULL || strcmp(url_text, "") == 0) { - tmp = g_strdup_printf("%s", _("Error retrieving profile")); - purple_notify_user_info_add_pair(user_info, NULL, tmp); - g_free(tmp); + purple_notify_user_info_add_pair(user_info, + _("Error retrieving profile"), NULL); purple_notify_userinfo(info_data->gc, info_data->name, user_info, NULL, NULL); purple_notify_user_info_destroy(user_info); @@ -2302,21 +2298,24 @@ char *p = strstr(url_buffer, "
gc), info_data->name); - purple_notify_user_info_add_pair(user_info, _("Error retrieving profile"), - ((p && b) ? _("The user has not created a public profile.") : - (p ? _("MSN reported not being able to find the user's profile. " - "This either means that the user does not exist, " - "or that the user exists " - "but has not created a public profile.") : - _("Could not find " /* This should never happen */ - "any information in the user's profile. " - "The user most likely does not exist.")))); + purple_notify_user_info_add_pair(user_info, + _("Error retrieving profile"), NULL); + purple_notify_user_info_add_pair(user_info, NULL, + ((p && b) ? _("The user has not created a public profile.") : + (p ? _("MSN reported not being able to find the user's profile. " + "This either means that the user does not exist, " + "or that the user exists " + "but has not created a public profile.") : + _("Could not find " /* This should never happen */ + "any information in the user's profile. " + "The user most likely does not exist.")))); } /* put a link to the actual profile URL */ - tmp = g_strdup_printf("%s%s", - PROFILE_URL, info_data->name, PROFILE_URL, info_data->name); - purple_notify_user_info_add_pair(user_info, _("Profile URL"), tmp); + purple_notify_user_info_add_section_break(user_info); + tmp = g_strdup_printf("%s", + PROFILE_URL, info_data->name, _("View web profile")); + purple_notify_user_info_add_pair(user_info, NULL, tmp); g_free(tmp); #if PHOTO_SUPPORT diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/protocols/msn/notification.c --- a/libpurple/protocols/msn/notification.c Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/protocols/msn/notification.c Fri Dec 12 20:03:58 2008 +0000 @@ -849,10 +849,35 @@ fqy_cmd_post(MsnCmdProc *cmdproc, MsnCommand *cmd, char *payload, size_t len) { - purple_debug_info("msn", "FQY payload:\n%s\n", payload); - g_return_if_fail(cmdproc->session != NULL); -/* msn_notification_post_adl(cmdproc, payload, len); */ -/* msn_get_address_book(cmdproc->session, MSN_AB_SAVE_CONTACT, NULL, NULL); */ + MsnUserList *userlist; + xmlnode *ml, *d, *c; + const char *domain; + const char *local; + const char *type; + char *passport; + MsnNetwork network = MSN_NETWORK_PASSPORT; + + userlist = cmdproc->session->userlist; + + /* FQY response: + */ + ml = xmlnode_from_str(payload, len); + d = xmlnode_get_child(ml, "d"); + c = xmlnode_get_child(d, "c"); + domain = xmlnode_get_attrib(d, "n"); + local = xmlnode_get_attrib(c, "n"); + type = xmlnode_get_attrib(c, "t"); + + passport = g_strdup_printf("%s@%s", local, domain); + + if (type != NULL) + network = (MsnNetwork)strtoul(type, NULL, 10); + purple_debug_info("msn", "FQY response says %s is from network %d\n", + passport, network); + msn_userlist_add_pending_buddy(userlist, passport, network); + + g_free(passport); + xmlnode_free(ml); } static void diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/protocols/msn/servconn.h --- a/libpurple/protocols/msn/servconn.h Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/protocols/msn/servconn.h Fri Dec 12 20:03:58 2008 +0000 @@ -40,7 +40,7 @@ MSN_SERVCONN_ERROR_NONE, MSN_SERVCONN_ERROR_CONNECT, MSN_SERVCONN_ERROR_WRITE, - MSN_SERVCONN_ERROR_READ, + MSN_SERVCONN_ERROR_READ } MsnServConnError; diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/protocols/msn/slpcall.h --- a/libpurple/protocols/msn/slpcall.h Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/protocols/msn/slpcall.h Fri Dec 12 20:03:58 2008 +0000 @@ -37,7 +37,7 @@ typedef enum { MSN_SLPCALL_ANY, - MSN_SLPCALL_DC, + MSN_SLPCALL_DC } MsnSlpCallType; diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/protocols/msn/switchboard.h --- a/libpurple/protocols/msn/switchboard.h Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/protocols/msn/switchboard.h Fri Dec 12 20:03:58 2008 +0000 @@ -57,7 +57,7 @@ typedef enum { MSN_SB_FLAG_IM = 0x01, /**< This switchboard is being used for a conversation. */ - MSN_SB_FLAG_FT = 0x02, /**< This switchboard is being used for file transfer. */ + MSN_SB_FLAG_FT = 0x02 /**< This switchboard is being used for file transfer. */ } MsnSBFlag; diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/protocols/msn/user.c --- a/libpurple/protocols/msn/user.c Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/protocols/msn/user.c Fri Dec 12 20:03:58 2008 +0000 @@ -339,6 +339,20 @@ } void +msn_user_set_pending_group(MsnUser *user, const char *group) +{ + user->pending_group = g_strdup(group); +} + +char * +msn_user_remove_pending_group(MsnUser *user) +{ + char *group = user->pending_group; + user->pending_group = NULL; + return group; +} + +void msn_user_set_home_phone(MsnUser *user, const char *number) { g_return_if_fail(user != NULL); diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/protocols/msn/user.h --- a/libpurple/protocols/msn/user.h Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/protocols/msn/user.h Fri Dec 12 20:03:58 2008 +0000 @@ -91,6 +91,7 @@ gboolean mobile; /**< Signed up with MSN Mobile. */ GList *group_ids; /**< The group IDs. */ + char *pending_group; /**< A pending group to add. */ MsnObject *msnobj; /**< The user's MSN Object. */ @@ -213,6 +214,23 @@ void msn_user_remove_group_id(MsnUser *user, const char * id); /** + * Sets the pending group for a user. + * + * @param user The user. + * @param group The group name. + */ +void msn_user_set_pending_group(MsnUser *user, const char *group); + +/** + * Removes the pending group from a user. + * + * @param user The user. + * + * @return Returns the pending group name. + */ +char *msn_user_remove_pending_group(MsnUser *user); + +/** * Sets the home phone number for a user. * * @param user The user. diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/protocols/msn/userlist.c --- a/libpurple/protocols/msn/userlist.c Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/protocols/msn/userlist.c Fri Dec 12 20:03:58 2008 +0000 @@ -184,10 +184,6 @@ { msn_user_add_group_id(user, group_id); } - else - { - /* session->sync->fl_users_count++; */ - } } else if (list_id == MSN_LIST_AL) { @@ -253,10 +249,6 @@ msn_user_remove_group_id(user, group_id); return; } - else - { - /* session->sync->fl_users_count--; */ - } } else if (list_id == MSN_LIST_AL) { @@ -756,6 +748,62 @@ msn_add_contact_to_group(userlist->session, state, who, group_id); } +/* + * Save a buddy address/group until we get back response from FQY + */ +void +msn_userlist_save_pending_buddy(MsnUserList *userlist, + const char *who, + const char *group_name) +{ + MsnUser *user; + + g_return_if_fail(userlist != NULL); + + user = msn_user_new(userlist, who, NULL); + msn_user_set_pending_group(user, group_name); + msn_user_set_network(user, MSN_NETWORK_UNKNOWN); + userlist->pending = g_list_prepend(userlist->pending, user); +} + +/* + * Actually adds a buddy once we have the response from FQY + */ +void +msn_userlist_add_pending_buddy(MsnUserList *userlist, + const char *who, + /*MsnNetwork*/ int network) +{ + MsnUser *user = NULL; + GList *l; + char *group; + + for (l = userlist->pending; l != NULL; l = l->next) + { + user = (MsnUser *)l->data; + + if (!g_strcasecmp(who, user->passport)) { + userlist->pending = g_list_delete_link(userlist->pending, l); + break; + } + } + + if (user == NULL) { + purple_debug_error("msn", "Attempting to add a pending user that does not exist.\n"); + return; + } + + /* Bit of a hack, but by adding to userlist now, the rest of the code + * will know what network to use. + */ + msn_user_set_network(user, network); + msn_userlist_add_user(userlist, user); + + group = msn_user_remove_pending_group(user); + msn_userlist_add_buddy(userlist, who, group); + g_free(group); +} + void msn_userlist_add_buddy_to_list(MsnUserList *userlist, const char *who, MsnListId list_id) diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/protocols/msn/userlist.h --- a/libpurple/protocols/msn/userlist.h Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/protocols/msn/userlist.h Fri Dec 12 20:03:58 2008 +0000 @@ -47,13 +47,12 @@ GList *users; /* Contains MsnUsers */ GList *groups; /* Contains MsnGroups */ + GList *pending; /* MsnUsers pending addition (waiting for FQY response) */ GQueue *buddy_icon_requests; int buddy_icon_window; guint buddy_icon_request_timer; - int fl_users_count; - }; gboolean msn_userlist_user_is_in_group(MsnUser *user, const char * group_id); @@ -93,6 +92,12 @@ void msn_userlist_rem_buddy(MsnUserList *userlist, const char *who); void msn_userlist_add_buddy(MsnUserList *userlist, const char *who, const char *group_name); +void msn_userlist_save_pending_buddy(MsnUserList *userlist, + const char *who, + const char *group_name); +void msn_userlist_add_pending_buddy(MsnUserList *userlist, + const char *who, + /*MsnNetwork*/ int network); void msn_userlist_move_buddy(MsnUserList *userlist, const char *who, const char *old_group_name, const char *new_group_name); diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/protocols/myspace/myspace.c --- a/libpurple/protocols/myspace/myspace.c Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/protocols/myspace/myspace.c Fri Dec 12 20:03:58 2008 +0000 @@ -980,15 +980,8 @@ if (!user) { /* User isn't on blist, create a temporary user to store info. */ - /* TODO: is this legit, or is it somehow responsible for #3444? */ - PurpleBuddy *buddy; - user = g_new0(MsimUser, 1); user->temporary_user = TRUE; - - buddy = purple_buddy_new(session->account, username, NULL); - user->buddy = buddy; - purple_buddy_set_protocol_data(buddy, (gpointer)user); } /* Update user structure with new information */ @@ -1005,7 +998,6 @@ purple_notify_user_info_destroy(user_info); if (user->temporary_user) { - purple_blist_remove_buddy(user->buddy); g_free(user->client_info); g_free(user->gender); g_free(user->location); @@ -1026,7 +1018,6 @@ { MsimSession *session; MsimUser *user; - guint uid; gchar *user_to_lookup; MsimMessage *user_msg; @@ -1041,8 +1032,8 @@ user = msim_find_user(session, username); /* If is on buddy list, lookup by uid since it is faster. */ - if (user && (uid = purple_blist_node_get_int((PurpleBlistNode *)user->buddy, "UserID"))) { - user_to_lookup = g_strdup_printf("%d", uid); + if (user && user->id) { + user_to_lookup = g_strdup_printf("%d", user->id); } else { /* Looking up buddy not on blist. Lookup by whatever user entered. */ user_to_lookup = g_strdup(username); @@ -1334,28 +1325,21 @@ { MsimSession *session; time_t delta; - gchar *errmsg; session = (MsimSession *)data; g_return_val_if_fail(MSIM_SESSION_VALID(session), FALSE); delta = time(NULL) - session->last_comm; + /* purple_debug_info("msim", "msim_check_alive: delta=%d\n", delta); */ if (delta >= MSIM_KEEPALIVE_INTERVAL) { - errmsg = g_strdup_printf(ngettext("Connection to server lost (no data received within %d second)", - "Connection to server lost (no data received within %d seconds)", - (int)delta), - (int)delta); - - purple_debug_info("msim", "msim_check_alive: %s > interval of %d, presumed dead\n", - errmsg, MSIM_KEEPALIVE_INTERVAL); + purple_debug_info("msim", + "msim_check_alive: %zu > interval of %d, presumed dead\n", + delta, MSIM_KEEPALIVE_INTERVAL); purple_connection_error_reason(session->gc, - PURPLE_CONNECTION_ERROR_NETWORK_ERROR, errmsg); - - purple_notify_error(session->gc, NULL, errmsg, NULL); - - g_free(errmsg); + PURPLE_CONNECTION_ERROR_NETWORK_ERROR, + _("Lost connection with server")); return FALSE; } @@ -1985,10 +1969,11 @@ purple_blist_add_buddy(buddy, NULL, NULL, NULL); user = msim_get_user_from_buddy(buddy); - - /* All buddies on list should have a UserID integer associated with them. */ - purple_blist_node_set_int((PurpleBlistNode *)buddy, "UserID", msim_msg_get_integer(msg, "f")); - + user->id = msim_msg_get_integer(msg, "f"); + + /* Keep track of the user ID across sessions */ + purple_blist_node_set_int((PurpleBlistNode *)buddy, "UserID", user->id); + msim_store_user_info(session, msg, NULL); } else { purple_debug_info("msim", "msim_status: found buddy %s\n", username); @@ -2893,7 +2878,8 @@ /* 3. Update buddy information */ user = msim_get_user_from_buddy(buddy); - /* All buddies on list should have 'uid' integer associated with them. */ + user->id = uid; + /* Keep track of the user ID across sessions */ purple_blist_node_set_int((PurpleBlistNode *)buddy, "UserID", uid); /* Stores a few fields in the MsimUser, relevant to the buddy itself. diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/protocols/myspace/user.c --- a/libpurple/protocols/myspace/user.c Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/protocols/myspace/user.c Fri Dec 12 20:03:58 2008 +0000 @@ -63,7 +63,7 @@ /* TODO: where is this freed? */ user = g_new0(MsimUser, 1); user->buddy = buddy; - purple_buddy_set_protocol_data(buddy, (gpointer)user); + purple_buddy_set_protocol_data(buddy, user); } return user; @@ -136,21 +136,23 @@ purple_notify_user_info_add_pair(user_info, _("Headline"), user->headline); } - presence = purple_buddy_get_presence(user->buddy); + if (user->buddy != NULL) { + presence = purple_buddy_get_presence(user->buddy); + + if (purple_presence_is_status_primitive_active(presence, PURPLE_STATUS_TUNE)) { + PurpleStatus *status; + const char *artist, *title; - if (purple_presence_is_status_primitive_active(presence, PURPLE_STATUS_TUNE)) { - PurpleStatus *status; - const char *artist, *title; - - status = purple_presence_get_status(presence, "tune"); - title = purple_status_get_attr_string(status, PURPLE_TUNE_TITLE); - artist = purple_status_get_attr_string(status, PURPLE_TUNE_ARTIST); + status = purple_presence_get_status(presence, "tune"); + title = purple_status_get_attr_string(status, PURPLE_TUNE_TITLE); + artist = purple_status_get_attr_string(status, PURPLE_TUNE_ARTIST); - str = msim_format_now_playing(artist, title); - if (str && *str) { - purple_notify_user_info_add_pair(user_info, _("Song"), str); + str = msim_format_now_playing(artist, title); + if (str && *str) { + purple_notify_user_info_add_pair(user_info, _("Song"), str); + } + g_free(str); } - g_free(str); } /* Note: total friends only available if looked up by uid, not username. */ @@ -178,6 +180,16 @@ purple_notify_user_info_add_pair(user_info, _("Client Version"), client); g_free(client); } + + if (full && user->id) { + /* TODO: link to username, if available */ + char *profile; + purple_notify_user_info_add_section_break(user_info); + profile = g_strdup_printf("%s", + user->id, _("View web profile")); + purple_notify_user_info_add_pair(user_info, NULL, profile); + g_free(profile); + } } /** Set the currently playing song artist and or title. @@ -200,12 +212,16 @@ const char *prev_artist, *prev_title; const char *name; + if (user->buddy == NULL) + /* User not on buddy list so nothing to do */ + return; + prev_artist = NULL; prev_title = NULL; - if (new_artist && !strlen(new_artist)) + if (new_artist && !*new_artist) new_artist = NULL; - if (new_title && !strlen(new_title)) + if (new_title && !*new_title) new_title = NULL; account = purple_buddy_get_account(user->buddy); @@ -251,10 +267,11 @@ const char *name = user->buddy ? purple_buddy_get_name(user->buddy) : NULL; if (g_str_equal(key_str, "UserID") || g_str_equal(key_str, "ContactID")) { /* Save to buddy list, if it exists, for quick cached uid lookup with msim_uid2username_from_blist(). */ + user->id = atol(value_str); if (user->buddy) { purple_debug_info("msim", "associating uid %s with username %s\n", key_str, name); - purple_blist_node_set_int((PurpleBlistNode *)user->buddy, "UserID", atol(value_str)); + purple_blist_node_set_int((PurpleBlistNode *)user->buddy, "UserID", user->id); } /* Need to store in MsimUser, too? What if not on blist? */ } else if (g_str_equal(key_str, "Age")) { diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/protocols/myspace/user.h --- a/libpurple/protocols/myspace/user.h Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/protocols/myspace/user.h Fri Dec 12 20:03:58 2008 +0000 @@ -25,6 +25,7 @@ typedef struct _MsimUser { PurpleBuddy *buddy; + int id; guint client_cv; gchar *client_info; guint age; diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/protocols/oscar/family_locate.c --- a/libpurple/protocols/oscar/family_locate.c Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/protocols/oscar/family_locate.c Fri Dec 12 20:03:58 2008 +0000 @@ -203,11 +203,9 @@ {0x2e, 0x7a, 0x64, 0x75, 0xfa, 0xdf, 0x4d, 0xc8, 0x88, 0x6f, 0xea, 0x35, 0x95, 0xfd, 0xb6, 0xdf}}, - /* - {OSCAR_CAPABILITY_ICQ2GO, + {OSCAR_CAPABILITY_TYPING, {0x56, 0x3f, 0xc8, 0x09, 0x0b, 0x6f, 0x41, 0xbd, 0x9f, 0x79, 0x42, 0x26, 0x09, 0xdf, 0xa2, 0xf3}}, - */ /* * Chat is oddball. diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/protocols/oscar/oscar.c --- a/libpurple/protocols/oscar/oscar.c Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/protocols/oscar/oscar.c Fri Dec 12 20:03:58 2008 +0000 @@ -68,7 +68,7 @@ static OscarCapability purple_caps = (OSCAR_CAPABILITY_CHAT | OSCAR_CAPABILITY_BUDDYICON | OSCAR_CAPABILITY_DIRECTIM | OSCAR_CAPABILITY_SENDFILE | OSCAR_CAPABILITY_UNICODE | OSCAR_CAPABILITY_INTEROPERATE | - OSCAR_CAPABILITY_SHORTCAPS); + OSCAR_CAPABILITY_SHORTCAPS | OSCAR_CAPABILITY_TYPING); static guint8 features_aim[] = {0x01, 0x01, 0x01, 0x02}; static guint8 features_icq[] = {0x01, 0x06}; @@ -3195,6 +3195,12 @@ } } + purple_notify_user_info_add_section_break(user_info); + tmp = g_strdup_printf("%s", + purple_normalize(account, userinfo->sn), _("View web profile")); + purple_notify_user_info_add_pair(user_info, NULL, tmp); + g_free(tmp); + purple_notify_userinfo(gc, userinfo->sn, user_info, NULL, NULL); purple_notify_user_info_destroy(user_info); diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/protocols/oscar/oscar.h --- a/libpurple/protocols/oscar/oscar.h Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/protocols/oscar/oscar.h Fri Dec 12 20:03:58 2008 +0000 @@ -362,8 +362,9 @@ OSCAR_CAPABILITY_LIVEVIDEO = 0x02000000, OSCAR_CAPABILITY_CAMERA = 0x04000000, OSCAR_CAPABILITY_ICHAT_SCREENSHARE = 0x08000000, - OSCAR_CAPABILITY_GENERICUNKNOWN = 0x10000000, - OSCAR_CAPABILITY_LAST = 0x20000000 + OSCAR_CAPABILITY_TYPING = 0x10000000, + OSCAR_CAPABILITY_GENERICUNKNOWN = 0x20000000, + OSCAR_CAPABILITY_LAST = 0x40000000 } OscarCapability; /* diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/protocols/qq/buddy_info.c --- a/libpurple/protocols/qq/buddy_info.c Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/protocols/qq/buddy_info.c Fri Dec 12 20:03:58 2008 +0000 @@ -58,7 +58,7 @@ #define QQ_PUBLISH_SIZE 3 static const gchar *publish_types[] = { - N_("Visible"), N_("Firend Only"), N_("Private") + N_("Visible"), N_("Friend Only"), N_("Private") }; #define QQ_GENDER_SIZE 3 @@ -87,7 +87,7 @@ QQ_INFO_UNKNOW3, QQ_INFO_UNKNOW4, QQ_INFO_UNKNOW5, QQ_INFO_IS_PUB_MOBILE, QQ_INFO_IS_PUB_CONTACT, QQ_INFO_COLLEGE, QQ_INFO_HOROSCOPE, QQ_INFO_ZODIAC, QQ_INFO_BLOOD, QQ_INFO_SHOW, QQ_INFO_UNKNOW6, - QQ_INFO_LAST_2007, QQ_INFO_LAST, + QQ_INFO_LAST_2007, QQ_INFO_LAST }; enum { @@ -95,7 +95,7 @@ }; enum { - QQ_FIELD_LABEL = 0, QQ_FIELD_STRING, QQ_FIELD_MULTI, QQ_FIELD_BOOL, QQ_FIELD_CHOICE, + QQ_FIELD_LABEL = 0, QQ_FIELD_STRING, QQ_FIELD_MULTI, QQ_FIELD_BOOL, QQ_FIELD_CHOICE }; typedef struct { @@ -504,8 +504,6 @@ { PurpleAccount *account = purple_connection_get_account(gc); const gchar *icon_path = purple_account_get_buddy_icon_path(account); - gchar **segments; - gint index; g_return_if_fail(icon_path != NULL); @@ -514,12 +512,6 @@ * purple_imgstore_get_filename is always new file * QQ buddy may set custom icon if level is over 16 */ purple_debug_info("QQ", "Change my icon to %s\n", icon_path); - segments = g_strsplit_set(icon_path, G_DIR_SEPARATOR_S, 0); - for (index = 0; segments[index] != NULL; index++) { - purple_debug_info("QQ", "Split to %s\n", segments[index]); - } - - g_strfreev(segments); } gchar *qq_get_icon_name(gint face) diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/protocols/qq/buddy_info.h --- a/libpurple/protocols/qq/buddy_info.h Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/protocols/qq/buddy_info.h Fri Dec 12 20:03:58 2008 +0000 @@ -71,7 +71,7 @@ QQ_BUDDY_INFO_MODIFY_BASE, QQ_BUDDY_INFO_MODIFY_EXT, QQ_BUDDY_INFO_MODIFY_ADDR, - QQ_BUDDY_INFO_MODIFY_CONTACT, + QQ_BUDDY_INFO_MODIFY_CONTACT }; gchar *qq_get_icon_name(gint face); diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/protocols/qq/buddy_opt.c --- a/libpurple/protocols/qq/buddy_opt.c Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/protocols/qq/buddy_opt.c Fri Dec 12 20:03:58 2008 +0000 @@ -46,7 +46,7 @@ enum { QQ_MY_AUTH_APPROVE = 0x30, /* ASCII value of "0" */ QQ_MY_AUTH_REJECT = 0x31, /* ASCII value of "1" */ - QQ_MY_AUTH_REQUEST = 0x32, /* ASCII value of "2" */ + QQ_MY_AUTH_REQUEST = 0x32 /* ASCII value of "2" */ }; typedef struct _qq_buddy_req { @@ -324,9 +324,9 @@ add_req->auth_len = 0; who = uid_to_purple_name(uid); - msg = g_strdup_printf(_("%u needs Q&A"), uid); - purple_request_input(gc, _("Add buddy Q&A"), msg, - _("Input answer here"), + msg = g_strdup_printf(_("%u requires verification"), uid); + purple_request_input(gc, _("Add buddy question"), msg, + _("Enter answer here"), NULL, TRUE, FALSE, NULL, _("Send"), G_CALLBACK(add_buddy_question_cb), @@ -623,7 +623,7 @@ qq_buddy_req *add_req = (qq_buddy_req *)data; gchar *who = uid_to_purple_name(add_req->uid); purple_request_input(add_req->gc, NULL, _("Authorization denied message:"), - NULL, _("Sorry, You are not my style."), TRUE, FALSE, NULL, + NULL, _("Sorry, you're not my style."), TRUE, FALSE, NULL, _("OK"), G_CALLBACK(buddy_add_deny_reason_cb), _("Cancel"), G_CALLBACK(buddy_add_deny_noreason_cb), purple_connection_get_account(add_req->gc), who, NULL, @@ -668,9 +668,9 @@ } who = uid_to_purple_name(uid); - msg = g_strdup_printf(_("%u needs authentication"), uid); + msg = g_strdup_printf(_("%u needs authorization"), uid); purple_request_input(gc, _("Add buddy authorize"), msg, - _("Input request here"), + _("Enter request here"), _("Would you be my friend?"), TRUE, FALSE, NULL, _("Send"), G_CALLBACK(add_buddy_auth_cb), diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/protocols/qq/buddy_opt.h --- a/libpurple/protocols/qq/buddy_opt.h Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/protocols/qq/buddy_opt.h Fri Dec 12 20:03:58 2008 +0000 @@ -38,14 +38,14 @@ QQ_AUTH_INFO_TEMP_SESSION = 0x0003, QQ_AUTH_INFO_CLUSTER = 0x0002, QQ_AUTH_INFO_REMOVE_BUDDY = 0x0006, - QQ_AUTH_INFO_UPDATE_BUDDY_INFO = 0x0007, + QQ_AUTH_INFO_UPDATE_BUDDY_INFO = 0x0007 }; enum { QQ_QUESTION_GET = 0x01, QQ_QUESTION_SET = 0x02, QQ_QUESTION_REQUEST = 0x03, /* get question only*/ - QQ_QUESTION_ANSWER = 0x04, + QQ_QUESTION_ANSWER = 0x04 }; void qq_add_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group); diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/protocols/qq/group.c --- a/libpurple/protocols/qq/group.c Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/protocols/qq/group.c Fri Dec 12 20:03:58 2008 +0000 @@ -116,7 +116,7 @@ return qd->roomlist; } -/* free roomlist space, I have no idea when this one is called ... */ +/* free roomlist space, I have no idea when this one is called... */ void qq_roomlist_cancel(PurpleRoomlist *list) { qq_data *qd; diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/protocols/qq/group.h --- a/libpurple/protocols/qq/group.h Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/protocols/qq/group.h Fri Dec 12 20:03:58 2008 +0000 @@ -37,7 +37,7 @@ QQ_ROOM_ROLE_NO = 0x00, /* default 0x00 means not member */ QQ_ROOM_ROLE_YES, QQ_ROOM_ROLE_REQUESTING, - QQ_ROOM_ROLE_ADMIN, + QQ_ROOM_ROLE_ADMIN } qq_room_role; typedef struct _qq_room_data qq_room_data; diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/protocols/qq/group_im.c --- a/libpurple/protocols/qq/group_im.c Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/protocols/qq/group_im.c Fri Dec 12 20:03:58 2008 +0000 @@ -329,6 +329,7 @@ return; } +#if 0 static void request_room_send_im_ex(PurpleConnection *gc, guint32 room_id, qq_im_format *fmt, gchar *msg, guint16 msg_id, guint8 frag_count, guint8 frag_index) { @@ -358,6 +359,7 @@ /*qq_show_packet("QQ_ROOM_CMD_SEND_IM_EX", raw_data, bytes); */ qq_send_room_cmd(gc, QQ_ROOM_CMD_SEND_IM_EX, room_id, raw_data, bytes); } +#endif /* send a chat msg to a QQ Qun * called by purple */ diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/protocols/qq/group_info.h --- a/libpurple/protocols/qq/group_info.h Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/protocols/qq/group_info.h Fri Dec 12 20:03:58 2008 +0000 @@ -31,7 +31,7 @@ enum { QQ_ROOM_INFO_UPDATE_ONLY = 0, - QQ_ROOM_INFO_DISPLAY, + QQ_ROOM_INFO_DISPLAY }; gint qq_request_room_get_buddies(PurpleConnection *gc, guint32 room_id, gint update_class); diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/protocols/qq/group_join.c --- a/libpurple/protocols/qq/group_join.c Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/protocols/qq/group_join.c Fri Dec 12 20:03:58 2008 +0000 @@ -44,7 +44,7 @@ enum { QQ_ROOM_JOIN_OK = 0x01, QQ_ROOM_JOIN_NEED_AUTH = 0x02, - QQ_ROOM_JOIN_DENIED = 0x03, + QQ_ROOM_JOIN_DENIED = 0x03 }; enum { @@ -219,11 +219,11 @@ rmd = qq_room_data_find(gc, id); if (rmd != NULL) { - msg = g_strdup_printf(_("Successed join to Qun %s (%u)"), rmd->title_utf8, rmd->ext_id); + msg = g_strdup_printf(_("Successfully joined Qun %s (%u)"), rmd->title_utf8, rmd->ext_id); qq_got_message(gc, msg); g_free(msg); } else { - qq_got_message(gc, _("Successed join to Qun")); + qq_got_message(gc, _("Successfully joined Qun")); } } @@ -254,7 +254,7 @@ g_return_if_fail(rmd != NULL); switch (reply) { case QQ_ROOM_JOIN_OK: - purple_debug_info("QQ", "Successed in joining group \"%s\"\n", rmd->title_utf8); + purple_debug_info("QQ", "Succeeded in joining group \"%s\"\n", rmd->title_utf8); rmd->my_role = QQ_ROOM_ROLE_YES; /* this must be shown before getting online members */ qq_room_conv_open(gc, rmd); @@ -267,7 +267,7 @@ do_room_join_request(gc, rmd); break; case QQ_ROOM_JOIN_DENIED: - msg = g_strdup_printf(_("Qun %u denied to join"), rmd->ext_id); + msg = g_strdup_printf(_("Qun %u denied from joining"), rmd->ext_id); purple_notify_info(gc, _("QQ Qun Operation"), _("Failed:"), msg); g_free(msg); break; @@ -276,7 +276,7 @@ "Failed to join room ext id %u %s, unknown reply: 0x%02x\n", rmd->ext_id, rmd->title_utf8, reply); - purple_notify_info(gc, _("QQ Qun Operation"), _("Failed:"), _("Join Qun, Unknow Reply")); + purple_notify_info(gc, _("QQ Qun Operation"), _("Failed:"), _("Join Qun, Unknown Reply")); } } diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/protocols/qq/group_opt.c --- a/libpurple/protocols/qq/group_opt.c Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/protocols/qq/group_opt.c Fri Dec 12 20:03:58 2008 +0000 @@ -122,7 +122,7 @@ who = uid_to_purple_name(add_req->member); purple_request_input(add_req->gc, NULL, _("Authorization denied message:"), - NULL, _("Sorry, you are not our style ..."), TRUE, FALSE, NULL, + NULL, _("Sorry, you are not our style"), TRUE, FALSE, NULL, _("OK"), G_CALLBACK(member_join_deny_reason_cb), _("Cancel"), G_CALLBACK(member_join_deny_noreason_cb), purple_connection_get_account(add_req->gc), who, NULL, @@ -204,7 +204,7 @@ purple_debug_info("QQ", "Succeed in modify members for room %u\n", rmd->ext_id); - qq_room_got_chat_in(gc, id, 0, _("Successfully changed Qun member"), now); + qq_room_got_chat_in(gc, id, 0, _("Successfully changed Qun members"), now); } void qq_room_change_info(PurpleConnection *gc, qq_room_data *rmd) @@ -347,7 +347,7 @@ purple_request_action(gc, _("QQ Qun Operation"), _("You have successfully created a Qun"), - _("Would you like to set up the detail information now?"), + _("Would you like to set up detailed information now?"), 1, purple_connection_get_account(gc), NULL, NULL, add_req, 2, @@ -519,7 +519,7 @@ rmd->my_role = QQ_ROOM_ROLE_YES; } - msg = g_strdup_printf(_("Joinning Qun %u is approved by admin %u for %s"), + msg = g_strdup_printf(_("Joining Qun %u is approved by admin %u for %s"), ext_id, admin_uid, reason); now = time(NULL); qq_room_got_chat_in(gc, id, 0, msg, now); diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/protocols/qq/im.h --- a/libpurple/protocols/qq/im.h Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/protocols/qq/im.h Fri Dec 12 20:03:58 2008 +0000 @@ -45,7 +45,7 @@ QQ_MSG_SYS_30 = 0x0030, QQ_MSG_SYS_4C = 0x004C, QQ_MSG_EXTEND = 0x0084, - QQ_MSG_EXTEND_85 = 0x0085, + QQ_MSG_EXTEND_85 = 0x0085 }; typedef struct { diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/protocols/qq/packet_parse.c --- a/libpurple/protocols/qq/packet_parse.c Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/protocols/qq/packet_parse.c Fri Dec 12 20:03:58 2008 +0000 @@ -32,11 +32,9 @@ /* note: * 1, in these functions, 'b' stands for byte, 'w' stands for word, 'dw' stands for double word. * 2, we use '*cursor' and 'buf' as two addresses to calculate the length. - * 3, change '0' to '1', if want to get more info about the packet parsing. */ + * 3, change 'undef' to 'define' to get more info about the packet parsing. */ -#if 0 -#define PARSER_DEBUG -#endif +#undef PARSER_DEBUG /* read one byte from buf, * return the number of bytes read if succeeds, otherwise return -1 */ diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/protocols/qq/qq.c --- a/libpurple/protocols/qq/qq.c Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/protocols/qq/qq.c Fri Dec 12 20:03:58 2008 +0000 @@ -497,7 +497,7 @@ icon_path = qq_get_icon_path(icon_name); g_free(icon_name); - purple_debug_info("QQ", "Change prev icon %s to ...\n", icon_path); + purple_debug_info("QQ", "Change prev icon %s to...\n", icon_path); purple_request_file(action, _("Select icon..."), icon_path, FALSE, G_CALLBACK(qq_change_icon_cb), NULL, diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/protocols/qq/qq_base.c --- a/libpurple/protocols/qq/qq_base.c Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/protocols/qq/qq_base.c Fri Dec 12 20:03:58 2008 +0000 @@ -72,7 +72,7 @@ qq_show_packet("Login reply OK, but length < 139", data, len); purple_connection_error_reason(gc, PURPLE_CONNECTION_ERROR_ENCRYPTION_ERROR, - _("Can not decrypt server reply")); + _("Cannot decrypt server reply")); return QQ_LOGIN_REPLY_ERR; } @@ -160,7 +160,7 @@ if (len < 11) { purple_connection_error_reason(gc, PURPLE_CONNECTION_ERROR_ENCRYPTION_ERROR, - _("Can not decrypt get server reply")); + _("Cannot decrypt server reply")); return QQ_LOGIN_REPLY_ERR; } @@ -424,7 +424,7 @@ qq_hex_dump(PURPLE_DEBUG_WARNING, "QQ", data, data_len, ">>> [default] decrypt and dump"); error = g_strdup_printf( - _("Unknow reply code when login (0x%02X)"), + _("Unknown reply code when logging in (0x%02X)"), ret ); reason = PURPLE_CONNECTION_ERROR_OTHER_ERROR; break; @@ -464,14 +464,16 @@ qq_data *qd; gchar **segments; - g_return_val_if_fail(data != NULL && data_len != 0, FALSE); + g_return_val_if_fail(data != NULL, FALSE); + g_return_val_if_fail(data_len != 0, FALSE); qd = (qq_data *) gc->proto_data; /* qq_show_packet("Keep alive reply packet", data, len); */ /* the last one is 60, don't know what it is */ - if (NULL == (segments = split_data(data, data_len, "\x1f", 6))) + segments = split_data(data, data_len, "\x1f", 6); + if (segments == NULL) return TRUE; /* segments[0] and segment[1] are all 0x30 ("0") */ @@ -479,7 +481,7 @@ if(0 == qd->online_total) { purple_connection_error_reason(gc, PURPLE_CONNECTION_ERROR_NETWORK_ERROR, - _("Keep alive error")); + _("Lost connection with server")); } qd->my_ip.s_addr = inet_addr(segments[3]); qd->my_port = strtol(segments[4], NULL, 10); @@ -528,7 +530,7 @@ if(0 == qd->online_total) { purple_connection_error_reason(gc, PURPLE_CONNECTION_ERROR_NETWORK_ERROR, - _("Keep alive error")); + _("Lost connection with server")); } bytes += qq_getIP(&qd->my_ip, data + bytes); @@ -572,7 +574,7 @@ if(0 == qd->online_total) { purple_connection_error_reason(gc, PURPLE_CONNECTION_ERROR_NETWORK_ERROR, - _("Keep alive error")); + _("Lost connection with server")); } bytes += qq_getIP(&qd->my_ip, data + bytes); @@ -653,7 +655,7 @@ if (data_len < 15) { purple_connection_error_reason(gc, PURPLE_CONNECTION_ERROR_ENCRYPTION_ERROR, - _("Can not decrypt get server reply")); + _("Could not decrypt server reply")); return QQ_LOGIN_REPLY_ERR; } @@ -745,7 +747,7 @@ qd->send_seq++; qq_send_cmd_encrypted(gc, QQ_CMD_TOKEN_EX, qd->send_seq, buf, bytes, TRUE); - purple_connection_update_progress(gc, _("Requesting captcha ..."), 3, QQ_CONNECT_STEPS); + purple_connection_update_progress(gc, _("Requesting captcha"), 3, QQ_CONNECT_STEPS); } static void request_token_ex_code(PurpleConnection *gc, @@ -790,7 +792,7 @@ qd->send_seq++; qq_send_cmd_encrypted(gc, QQ_CMD_TOKEN_EX, qd->send_seq, buf, bytes, TRUE); - purple_connection_update_progress(gc, _("Checking code of captcha ..."), 3, QQ_CONNECT_STEPS); + purple_connection_update_progress(gc, _("Checking captcha"), 3, QQ_CONNECT_STEPS); } typedef struct { @@ -813,7 +815,7 @@ purple_connection_error_reason(captcha_req->gc, PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED, - _("Failed captcha verify")); + _("Failed captcha verification")); } static void captcha_input_ok_cb(qq_captcha_request *captcha_req, @@ -872,8 +874,8 @@ purple_request_field_group_add_field(group, field); purple_request_fields(account, - _("QQ Captcha Verifing"), - _("QQ Captcha Verifing"), + _("QQ Captcha Verification"), + _("QQ Captcha Verification"), _("Enter the text from the image"), fields, _("OK"), G_CALLBACK(captcha_input_ok_cb), @@ -1111,7 +1113,7 @@ qq_hex_dump(PURPLE_DEBUG_WARNING, "QQ", data, data_len, ">>> [default] decrypt and dump"); error = g_strdup_printf( - _("Unknow reply code when checking password (0x%02X)"), + _("Unknown reply when checking password (0x%02X)"), ret ); reason = PURPLE_CONNECTION_ERROR_OTHER_ERROR; break; @@ -1257,7 +1259,7 @@ /* Missing get server before login*/ default: error = g_strdup_printf( - _("Unknow reply code when login (0x%02X):\n%s"), + _("Unknown reply code when logging in (0x%02X):\n%s"), ret, msg_utf8); break; } @@ -1446,7 +1448,7 @@ break; default: error = g_strdup_printf( - _("Unknow reply code when login (0x%02X):\n%s"), + _("Unknown reply code when logging in (0x%02X):\n%s"), ret, msg_utf8); break; } diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/protocols/qq/qq_define.h --- a/libpurple/protocols/qq/qq_define.h Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/protocols/qq/qq_define.h Fri Dec 12 20:03:58 2008 +0000 @@ -74,7 +74,7 @@ QQ_CMD_ADD_BUDDY_NO_AUTH_EX = 0x00A7, /* add friend without auth */ QQ_CMD_ADD_BUDDY_AUTH_EX = 0x00A8, /* add buddy with auth */ QQ_CMD_BUDDY_CHECK_CODE = 0x00B5, - QQ_CMD_BUDDY_QUESTION = 0x00B7, + QQ_CMD_BUDDY_QUESTION = 0x00B7 }; const gchar *qq_get_cmd_desc(gint type); @@ -104,7 +104,7 @@ QQ_ROOM_CMD_TEMP_QUIT = 0x32, QQ_ROOM_CMD_TEMP_GET_INFO = 0x33, QQ_ROOM_CMD_TEMP_SEND_IM = 0x35, - QQ_ROOM_CMD_TEMP_GET_MEMBERS = 0x37, + QQ_ROOM_CMD_TEMP_GET_MEMBERS = 0x37 }; const gchar *qq_get_room_cmd_desc(gint room_cmd); @@ -119,7 +119,7 @@ QQ_SERVER_BUDDY_ADDING_EX = 40, QQ_SERVER_BUDDY_ADD_REQUEST_EX = 41, QQ_SERVER_BUDDY_ADDED_ANSWER = 42, - QQ_SERVER_BUDDY_ADDED_EX = 43, + QQ_SERVER_BUDDY_ADDED_EX = 43 }; enum { @@ -128,7 +128,7 @@ QQ_BUDDY_CHANGE_TO_OFFLINE = 20, QQ_BUDDY_ONLINE_AWAY = 30, QQ_BUDDY_ONLINE_INVISIBLE = 40, - QQ_BUDDY_ONLINE_BUSY = 50, + QQ_BUDDY_ONLINE_BUSY = 50 }; gboolean is_online(guint8 status); diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/protocols/qq/qq_network.c --- a/libpurple/protocols/qq/qq_network.c Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/protocols/qq/qq_network.c Fri Dec 12 20:03:58 2008 +0000 @@ -376,7 +376,7 @@ /* No worries */ return; - error_msg = g_strdup_printf(_("Lost connection with server:\n%d, %s"), errno, g_strerror(errno)); + error_msg = g_strdup_printf(_("Lost connection with server:\n%s"), g_strerror(errno)); purple_connection_error_reason(gc, PURPLE_CONNECTION_ERROR_NETWORK_ERROR, error_msg); @@ -773,12 +773,12 @@ set_all_keys( gc ); if (qd->client_version >= 2007) { - purple_connection_update_progress(gc, _("Get server ..."), 2, QQ_CONNECT_STEPS); + purple_connection_update_progress(gc, _("Getting server"), 2, QQ_CONNECT_STEPS); qq_request_get_server(gc); return; } - purple_connection_update_progress(gc, _("Request token"), 2, QQ_CONNECT_STEPS); + purple_connection_update_progress(gc, _("Requesting token"), 2, QQ_CONNECT_STEPS); qq_request_token(gc); } @@ -935,7 +935,7 @@ return FALSE; } - purple_connection_update_progress(gc, _("Connecting server ..."), 1, QQ_CONNECT_STEPS); + purple_connection_update_progress(gc, _("Connecting to server"), 1, QQ_CONNECT_STEPS); purple_debug_info("QQ", "Connect to %s:%d\n", server, port); @@ -951,7 +951,7 @@ qd->conn_data = purple_proxy_connect_udp(gc, account, server, port, connect_cb, gc); } if ( qd->conn_data == NULL ) { - purple_debug_error("QQ", _("Couldn't create socket")); + purple_debug_error("QQ", "Couldn't create socket"); return FALSE; } #else @@ -986,7 +986,7 @@ g_return_if_fail(gc != NULL && gc->proto_data != NULL); qd = (qq_data *) gc->proto_data; - purple_debug_info("QQ", "Disconnecting ...\n"); + purple_debug_info("QQ", "Disconnecting...\n"); if (qd->network_watcher > 0) { purple_debug_info("QQ", "Remove network watcher\n"); diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/protocols/qq/qq_process.c --- a/libpurple/protocols/qq/qq_process.c Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/protocols/qq/qq_process.c Fri Dec 12 20:03:58 2008 +0000 @@ -87,7 +87,7 @@ if (data[0] != 0) { purple_debug_warning("QQ", "Failed sent IM\n"); - purple_notify_error(gc, _("Error"), _("Failed to send IM."), NULL); + purple_notify_error(gc, _("Error"), _("Unable to send message."), NULL); return; } @@ -538,7 +538,7 @@ qq_process_buddy_change_status(data, data_len, gc); break; default: - process_unknow_cmd(gc, _("Unknow SERVER CMD"), data, data_len, cmd, seq); + process_unknow_cmd(gc, _("Unknown SERVER CMD"), data, data_len, cmd, seq); break; } } @@ -796,7 +796,7 @@ seq, room_cmd, qq_get_room_cmd_desc(room_cmd), room_id, rcved_len); } else { purple_debug_warning("QQ", - _("Not a member of room \"%s\"\n"), rmd->title_utf8); + "Not a member of room \"%s\"\n", rmd->title_utf8); rmd->my_role = QQ_ROOM_ROLE_NO; } break; @@ -948,7 +948,7 @@ qq_show_packet("Can not decrypted", rcved, rcved_len); purple_connection_error_reason(gc, PURPLE_CONNECTION_ERROR_ENCRYPTION_ERROR, - _("Can not decrypt login reply")); + _("Could not decrypt login reply")); return QQ_LOGIN_REPLY_ERR; } @@ -1019,7 +1019,7 @@ qq_update_all(gc, 0); break; default: - process_unknow_cmd(gc, _("Unknow LOGIN CMD"), data, data_len, cmd, seq); + process_unknow_cmd(gc, _("Unknown LOGIN CMD"), data, data_len, cmd, seq); return QQ_LOGIN_REPLY_ERR; } return QQ_LOGIN_REPLY_OK; @@ -1141,7 +1141,7 @@ qq_process_buddy_check_code(gc, data, data_len); break; default: - process_unknow_cmd(gc, _("Unknow CLIENT CMD"), data, data_len, cmd, seq); + process_unknow_cmd(gc, _("Unknown CLIENT CMD"), data, data_len, cmd, seq); is_unknow = TRUE; break; } diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/protocols/qq/qq_process.h --- a/libpurple/protocols/qq/qq_process.h Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/protocols/qq/qq_process.h Fri Dec 12 20:03:58 2008 +0000 @@ -35,7 +35,7 @@ QQ_CMD_CLASS_UPDATE_ALL, QQ_CMD_CLASS_UPDATE_ONLINE, QQ_CMD_CLASS_UPDATE_BUDDY, - QQ_CMD_CLASS_UPDATE_ROOM, + QQ_CMD_CLASS_UPDATE_ROOM }; guint8 qq_proc_login_cmds(PurpleConnection *gc, guint16 cmd, guint16 seq, diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/protocols/qq/qq_trans.c --- a/libpurple/protocols/qq/qq_trans.c Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/protocols/qq/qq_trans.c Fri Dec 12 20:03:58 2008 +0000 @@ -39,7 +39,7 @@ QQ_TRANS_IS_SERVER = 0x01, /* Is server command or client command */ QQ_TRANS_IS_IMPORT = 0x02, /* Only notice if not get reply; or resend, disconn if reties get 0*/ QQ_TRANS_REMAINED = 0x04, /* server command before login*/ - QQ_TRANS_IS_REPLY = 0x08, /* server command before login*/ + QQ_TRANS_IS_REPLY = 0x08 /* server command before login*/ }; struct _qq_transaction { diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/protocols/qq/send_file.c --- a/libpurple/protocols/qq/send_file.c Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/protocols/qq/send_file.c Fri Dec 12 20:03:58 2008 +0000 @@ -612,7 +612,8 @@ PurpleConnection *gc; PurpleAccount *account; guint32 to_uid; - gchar *filename, *filename_without_path; + const gchar *filename; + gchar *base_filename; g_return_if_fail (xfer != NULL); account = purple_xfer_get_account(xfer); @@ -621,13 +622,14 @@ to_uid = purple_name_to_uid (xfer->who); g_return_if_fail (to_uid != 0); - filename = (gchar *) purple_xfer_get_local_filename (xfer); + filename = purple_xfer_get_local_filename (xfer); g_return_if_fail (filename != NULL); - filename_without_path = strrchr (filename, '/') + 1; + base_filename = g_path_get_basename(filename); - _qq_send_packet_file_request (gc, to_uid, filename_without_path, + _qq_send_packet_file_request (gc, to_uid, base_filename, purple_xfer_get_size(xfer)); + g_free(base_filename); } /* cancel the transfer of receiving files */ @@ -696,7 +698,7 @@ return; } */ - filename = strrchr(purple_xfer_get_local_filename(qd->xfer), '/') + 1; + filename = g_path_get_basename(purple_xfer_get_local_filename(qd->xfer)); msg = g_strdup_printf(_("%d has declined the file %s"), sender_uid, filename); @@ -704,7 +706,8 @@ purple_xfer_request_denied(qd->xfer); qd->xfer = NULL; - g_free (msg); + g_free(filename); + g_free(msg); } /* process cancel im for file transfer request */ @@ -725,7 +728,7 @@ return; } */ - filename = strrchr(purple_xfer_get_local_filename(qd->xfer), '/') + 1; + filename = g_path_get_basename(purple_xfer_get_local_filename(qd->xfer)); msg = g_strdup_printf (_("%d canceled the transfer of %s"), sender_uid, filename); @@ -734,7 +737,8 @@ purple_xfer_cancel_remote(qd->xfer); qd->xfer = NULL; - g_free (msg); + g_free(filename); + g_free(msg); } /* process accept im for file transfer request */ diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/protocols/sametime/sametime.c --- a/libpurple/protocols/sametime/sametime.c Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/protocols/sametime/sametime.c Fri Dec 12 20:03:58 2008 +0000 @@ -158,7 +158,7 @@ blist_choice_LOCAL = 1, /**< local only */ blist_choice_MERGE = 2, /**< merge from server */ blist_choice_STORE = 3, /**< merge from and save to server */ - blist_choice_SYNCH = 4, /**< sync with server */ + blist_choice_SYNCH = 4 /**< sync with server */ }; diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/protocols/silc10/wb.c --- a/libpurple/protocols/silc10/wb.c Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/protocols/silc10/wb.c Fri Dec 12 20:03:58 2008 +0000 @@ -61,14 +61,14 @@ /* Commands */ typedef enum { SILCPURPLE_WB_DRAW = 0x01, - SILCPURPLE_WB_CLEAR = 0x02, + SILCPURPLE_WB_CLEAR = 0x02 } SilcPurpleWbCommand; /* Brush size */ typedef enum { SILCPURPLE_WB_BRUSH_SMALL = 2, SILCPURPLE_WB_BRUSH_MEDIUM = 5, - SILCPURPLE_WB_BRUSH_LARGE = 10, + SILCPURPLE_WB_BRUSH_LARGE = 10 } SilcPurpleWbBrushSize; /* Brush color (XXX Purple should provide default colors) */ @@ -85,7 +85,7 @@ SILCPURPLE_WB_COLOR_TAN = 12093547, SILCPURPLE_WB_COLOR_BROWN = 5256485, SILCPURPLE_WB_COLOR_GREY = 11184810, - SILCPURPLE_WB_COLOR_WHITE = 16777215, + SILCPURPLE_WB_COLOR_WHITE = 16777215 } SilcPurpleWbColor; typedef struct { diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/protocols/yahoo/yahoo_aliases.c --- a/libpurple/protocols/yahoo/yahoo_aliases.c Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/protocols/yahoo/yahoo_aliases.c Fri Dec 12 20:03:58 2008 +0000 @@ -301,7 +301,7 @@ "\n\r\n", purple_account_get_username(gc->account), who, converted_alias_jp); - free(converted_alias_jp); + g_free(converted_alias_jp); g_free(alias_jp); } else { gchar *escaped_alias = g_markup_escape_text(alias, -1); @@ -321,7 +321,7 @@ "\n\r\n", purple_account_get_username(gc->account), who, cb->id, converted_alias_jp); - free(converted_alias_jp); + g_free(converted_alias_jp); g_free(alias_jp); } else { gchar *escaped_alias = g_markup_escape_text(alias, -1); diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/protocols/yahoo/yahoo_profile.c --- a/libpurple/protocols/yahoo/yahoo_profile.c Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/protocols/yahoo/yahoo_profile.c Fri Dec 12 20:03:58 2008 +0000 @@ -808,7 +808,7 @@ */ if (error_message != NULL || url_text == NULL || strcmp(url_text, "") == 0) { purple_notify_user_info_add_pair(user_info, _("Error retrieving profile"), NULL); - purple_notify_userinfo(info_data->gc, info_data->name, + purple_notify_userinfo(info_data->gc, info_data->name, user_info, NULL, NULL); purple_notify_user_info_destroy(user_info); g_free(profile_url_text); @@ -842,10 +842,10 @@ _("If you wish to view this profile, " "you will need to visit this link in your web browser:"), profile_url_text, profile_url_text); - purple_notify_user_info_add_pair(user_info, NULL, tmp); + purple_notify_user_info_add_pair(user_info, NULL, tmp); g_free(tmp); - purple_notify_userinfo(info_data->gc, info_data->name, + purple_notify_userinfo(info_data->gc, info_data->name, user_info, NULL, NULL); g_free(profile_url_text); @@ -1194,17 +1194,15 @@ if(!found) { - GString *str = g_string_new(""); + const gchar *str; - g_string_append_printf(str, "
"); - g_string_append_printf(str, _("User information for %s unavailable"), - info_data->name); - g_string_append_printf(str, "
"); + purple_notify_user_info_add_section_break(user_info); + purple_notify_user_info_add_pair(user_info, + _("Error retrieving profile"), NULL); if (profile_state == PROFILE_STATE_UNKNOWN_LANGUAGE) { - g_string_append_printf(str, "%s

", - _("Sorry, this profile seems to be in a language " - "or format that is not supported at this time.")); + str = _("This profile is in a language " + "or format that is not supported at this time."); } else if (profile_state == PROFILE_STATE_NOT_FOUND) { PurpleBuddy *b = purple_find_buddy @@ -1220,27 +1218,26 @@ f = yahoo_friend_find(purple_account_get_connection(account), purple_buddy_get_name(b)); } - g_string_append_printf(str, "%s

", - f? _("Could not retrieve the user's profile. " + str = f ? _("Could not retrieve the user's profile. " "This most likely is a temporary server-side problem. " - "Please try again later."): + "Please try again later.") : _("Could not retrieve the user's profile. " "This most likely means that the user does not exist; " "however, Yahoo! sometimes does fail to find a user's " "profile. If you know that the user exists, " - "please try again later.")); + "please try again later."); } else { - g_string_append_printf(str, "%s

", - _("The user's profile is empty.")); + str = _("The user's profile is empty."); } - - purple_notify_user_info_add_pair(user_info, NULL, str->str); - g_string_free(str, TRUE); + + purple_notify_user_info_add_pair(user_info, NULL, str); } /* put a link to the actual profile URL */ - tmp = g_strdup_printf("%s", profile_url_text, profile_url_text); - purple_notify_user_info_add_pair(user_info, _("Profile URL"), tmp); + purple_notify_user_info_add_section_break(user_info); + tmp = g_strdup_printf("%s", + profile_url_text, _("View web profile")); + purple_notify_user_info_add_pair(user_info, NULL, tmp); g_free(tmp); g_free(stripped); diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/protocols/yahoo/yahoochat.c --- a/libpurple/protocols/yahoo/yahoochat.c Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/protocols/yahoo/yahoochat.c Fri Dec 12 20:03:58 2008 +0000 @@ -1180,7 +1180,7 @@ enum yahoo_room_type { yrt_yahoo, - yrt_user, + yrt_user }; struct yahoo_chatxml_state { diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/protocols/yahoo/ycht.h --- a/libpurple/protocols/yahoo/ycht.h Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/protocols/yahoo/ycht.h Fri Dec 12 20:03:58 2008 +0000 @@ -43,7 +43,7 @@ YCHT_SERVICE_CHATMSG = 0x41, YCHT_SERVICE_CHATMSG_EMOTE = 0x43, YCHT_SERVICE_PING = 0x62, - YCHT_SERVICE_ONLINE_FRIENDS = 0x68, + YCHT_SERVICE_ONLINE_FRIENDS = 0x68 } ycht_service; /* yahoo: YCHT Service: 0x11 Version: 0x100 diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/protocols/zephyr/zephyr.c --- a/libpurple/protocols/zephyr/zephyr.c Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/protocols/zephyr/zephyr.c Fri Dec 12 20:03:58 2008 +0000 @@ -64,7 +64,7 @@ PURPLE_ZEPHYR_NONE, /* Non-kerberized ZEPH0.2 */ PURPLE_ZEPHYR_KRB4, /* ZEPH0.2 w/ KRB4 support */ PURPLE_ZEPHYR_TZC, /* tzc executable proxy */ - PURPLE_ZEPHYR_INTERGALACTIC_KRB4, /* Kerberized ZEPH0.3 */ + PURPLE_ZEPHYR_INTERGALACTIC_KRB4 /* Kerberized ZEPH0.3 */ } zephyr_connection_type; struct _zephyr_account { diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/prpl.h --- a/libpurple/prpl.h Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/prpl.h Fri Dec 12 20:03:58 2008 +0000 @@ -189,7 +189,7 @@ * Used as a hint that unknown commands should not be sent as messages. * @since 2.1.0 */ - OPT_PROTO_SLASH_COMMANDS_NATIVE = 0x00000400, + OPT_PROTO_SLASH_COMMANDS_NATIVE = 0x00000400 } PurpleProtocolOptions; diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/smiley.c --- a/libpurple/smiley.c Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/smiley.c Fri Dec 12 20:03:58 2008 +0000 @@ -288,7 +288,7 @@ { PROP_0, PROP_SHORTCUT, - PROP_IMGSTORE, + PROP_IMGSTORE }; #define PROP_SHORTCUT_S "shortcut" diff -r 146ee5c01696 -r 1260a3fb60f4 libpurple/win32/global.mak --- a/libpurple/win32/global.mak Fri Dec 12 07:26:20 2008 +0000 +++ b/libpurple/win32/global.mak Fri Dec 12 20:03:58 2008 +0000 @@ -16,11 +16,11 @@ GTK_BIN ?= $(GTK_TOP)/bin BONJOUR_TOP ?= $(WIN32_DEV_TOP)/Bonjour_SDK LIBXML2_TOP ?= $(WIN32_DEV_TOP)/libxml2-2.6.30 -MEANWHILE_TOP ?= $(WIN32_DEV_TOP)/meanwhile-1.0.2_daa1 +MEANWHILE_TOP ?= $(WIN32_DEV_TOP)/meanwhile-1.0.2_daa2 NSPR_TOP ?= $(WIN32_DEV_TOP)/nspr-4.6.4 NSS_TOP ?= $(WIN32_DEV_TOP)/nss-3.11.4 PERL_LIB_TOP ?= $(WIN32_DEV_TOP)/perl-5.10.0 -SILC_TOOLKIT ?= $(WIN32_DEV_TOP)/silc-toolkit-1.1.7 +SILC_TOOLKIT ?= $(WIN32_DEV_TOP)/silc-toolkit-1.1.8 TCL_LIB_TOP ?= $(WIN32_DEV_TOP)/tcl-8.4.5 GSTREAMER_TOP ?= $(WIN32_DEV_TOP)/gstreamer-0.10.13 diff -r 146ee5c01696 -r 1260a3fb60f4 pidgin/gtkutils.c --- a/pidgin/gtkutils.c Fri Dec 12 07:26:20 2008 +0000 +++ b/pidgin/gtkutils.c Fri Dec 12 20:03:58 2008 +0000 @@ -3279,13 +3279,7 @@ static void combo_box_changed_cb(GtkComboBox *combo_box, GtkEntry *entry) { -#if GTK_CHECK_VERSION(2, 6, 0) char *text = gtk_combo_box_get_active_text(combo_box); -#else - GtkWidget *widget = gtk_bin_get_child(GTK_BIN(combo_box)); - char *text = g_strdup(gtk_entry_get_text(GTK_ENTRY(widget))); -#endif - gtk_entry_set_text(entry, text ? text : ""); g_free(text); } diff -r 146ee5c01696 -r 1260a3fb60f4 pidgin/plugins/perl/common/GtkIMHtml.xs --- a/pidgin/plugins/perl/common/GtkIMHtml.xs Fri Dec 12 07:26:20 2008 +0000 +++ b/pidgin/plugins/perl/common/GtkIMHtml.xs Fri Dec 12 20:03:58 2008 +0000 @@ -173,7 +173,7 @@ t_GL = NULL; t_len = av_len((AV *)SvRV(unused)); - for (i = 0; i < t_len; i++) { + for (i = 0; i <= t_len; i++) { STRLEN t_sl; t_GL = g_slist_append(t_GL, SvPV(*av_fetch((AV *)SvRV(unused), i, 0), t_sl)); } diff -r 146ee5c01696 -r 1260a3fb60f4 po/de.po --- a/po/de.po Fri Dec 12 07:26:20 2008 +0000 +++ b/po/de.po Fri Dec 12 20:03:58 2008 +0000 @@ -7,14 +7,15 @@ # # This file is distributed under the same license as the Pidgin package. # +# Jochen Kemnade , 2008. msgid "" msgstr "" "Project-Id-Version: de\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-12-01 15:52-0800\n" -"PO-Revision-Date: 2008-10-28 17:46+0100\n" +"POT-Creation-Date: 2008-12-12 17:46+0100\n" +"PO-Revision-Date: 2008-12-12 17:42+0100\n" "Last-Translator: Jochen Kemnade \n" -"Language-Team: Deutsch \n" +"Language-Team: German \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -1127,7 +1128,6 @@ msgid "%s has sent you a message. (%s)" msgstr "%s hat Ihnen eine Nachricht gesendet. (%s)" -#, c-format msgid "Unknown pounce event. Please report this!" msgstr "Unbekanntes Alarm-Ereignis. Bitte berichten Sie dieses Problem!" @@ -1497,7 +1497,6 @@ "Wenn eine neue Unterhaltung eröffnet wird, fügt dieses Plugin die letzte " "Unterhaltung in die aktuelle Unterhaltung ein." -#, c-format msgid "Online" msgstr "Online" @@ -1840,7 +1839,6 @@ "Fehler beim Lesen vom Auflösungsprozess:\n" "%s" -#, c-format msgid "Resolver process exited without answering our request" msgstr "Auflösungsprozess hat sich beendet ohne die Anfrage zu beantworten" @@ -1931,7 +1929,6 @@ msgid "Transfer of file %s complete" msgstr "Übertragung der Datei %s ist komplett" -#, c-format msgid "File transfer complete" msgstr "Dateiübertragung ist komplett" @@ -1939,7 +1936,6 @@ msgid "You canceled the transfer of %s" msgstr "Sie haben die Dateiübertragung von %s abgebrochen" -#, c-format msgid "File transfer cancelled" msgstr "Dateiübertragung wurde abgebrochen" @@ -2147,7 +2143,6 @@ msgid "You are using %s, but this plugin requires %s." msgstr "Sie benutzen %s, aber dieses Plugin benötigt %s." -#, c-format msgid "This plugin has not defined an ID." msgstr "Dieses Plugin hat keine ID definiert." @@ -3043,7 +3038,6 @@ #. get_yahoo_status_from_purple_status() returns YAHOO_STATUS_CUSTOM for #. * the generic away state (YAHOO_STATUS_TYPE_AWAY) with no message #. Away stuff -#, c-format msgid "Away" msgstr "Abwesend" @@ -3935,7 +3929,6 @@ msgid "Extended Away" msgstr "Abwesend (erweitert)" -#, c-format msgid "Do Not Disturb" msgstr "Nicht stören" @@ -4690,6 +4683,19 @@ msgid "Unable to retrieve MSN Address Book" msgstr "Konnte das MSN-Adressbuch nicht abrufen" +#. only notify the user about problems adding to the friends list +#. * maybe we should do something else for other lists, but it probably +#. * won't cause too many problems if we just ignore it +#, c-format +msgid "Unable to add \"%s\"." +msgstr "Kann „%s“ nicht hinzufügen." + +msgid "Buddy Add error" +msgstr "" + +msgid "The username specified does not exist." +msgstr "Der angegebene Benutzername existiert nicht." + #, c-format msgid "Buddy list synchronization issue in %s (%s)" msgstr "Fehler bei der Buddy-Listen-Synchronisation bei %s (%s)" @@ -4710,220 +4716,166 @@ "%s ist auf der lokalen Liste, aber nicht auf der Serverliste. Möchten Sie, " "dass der Buddy hinzugefügt wird?" -#, c-format msgid "Unable to parse message" msgstr "Kann die Nachricht nicht parsen" -#, c-format msgid "Syntax Error (probably a client bug)" msgstr "Syntaxfehler (wahrscheinlich ein Client-Bug)" -#, c-format msgid "Invalid email address" msgstr "Ungültige E-Mail-Adresse" -#, c-format msgid "User does not exist" msgstr "Benutzer existiert nicht" -#, c-format msgid "Fully qualified domain name missing" msgstr "Der Fully Qualified Domain Name fehlt" -#, c-format msgid "Already logged in" msgstr "Schon angemeldet" -#, c-format msgid "Invalid username" msgstr "Ungültiger Benutzername" -#, c-format msgid "Invalid friendly name" msgstr "Ungültiger Freundesname" -#, c-format msgid "List full" msgstr "Liste voll" -#, c-format msgid "Already there" msgstr "Schon da" -#, c-format msgid "Not on list" msgstr "Nicht auf der Liste" -#, c-format msgid "User is offline" msgstr "Benutzer ist offline" -#, c-format msgid "Already in the mode" msgstr "Bereits in diesem Modus" -#, c-format msgid "Already in opposite list" msgstr "Bereits in der „Gegenteil-Liste“" -#, c-format msgid "Too many groups" msgstr "Zu viele Gruppen" -#, c-format msgid "Invalid group" msgstr "Ungültige Gruppe" -#, c-format msgid "User not in group" msgstr "Benutzer ist nicht in der Gruppe" -#, c-format msgid "Group name too long" msgstr "Name der Gruppe ist zu lang" -#, c-format msgid "Cannot remove group zero" msgstr "Kann die Gruppe „Null“ nicht entfernen" -#, c-format msgid "Tried to add a user to a group that doesn't exist" msgstr "" "Versuchte einen Benutzer zu einer nichtexistierenden Gruppe hinzuzufügen" -#, c-format msgid "Switchboard failed" msgstr "Vermittlung gescheitert" -#, c-format msgid "Notify transfer failed" msgstr "Übertragung der Benachrichtigung gescheitert" -#, c-format msgid "Required fields missing" msgstr "Notwendige Felder fehlen" -#, c-format msgid "Too many hits to a FND" msgstr "Zu viele Treffer zu einem FND" -#, c-format msgid "Not logged in" msgstr "Nicht angemeldet" -#, c-format msgid "Service temporarily unavailable" msgstr "Dienst momentan nicht verfügbar" -#, c-format msgid "Database server error" msgstr "Fehler des Datenbank-Servers" -#, c-format msgid "Command disabled" msgstr "Kommando abgeschaltet" -#, c-format msgid "File operation error" msgstr "Dateiverarbeitungsfehler" -#, c-format msgid "Memory allocation error" msgstr "Fehler bei der Speicheranforderung" -#, c-format msgid "Wrong CHL value sent to server" msgstr "Falscher CHL-Wert zum Server gesendet" -#, c-format msgid "Server busy" msgstr "Server beschäftigt" -#, c-format msgid "Server unavailable" msgstr "Server unerreichbar" -#, c-format msgid "Peer notification server down" msgstr "Peer-Benachrichtigungsserver nicht erreichbar" -#, c-format msgid "Database connect error" msgstr "Datenbank-Verbindungsfehler" -#, c-format msgid "Server is going down (abandon ship)" msgstr "Server fährt runter (melden Sie sich ab)" -#, c-format msgid "Error creating connection" msgstr "Fehler beim Herstellen der Verbindung" -#, c-format msgid "CVR parameters are either unknown or not allowed" msgstr "CVR-Parameter sind entweder unbekannt oder nicht erlaubt" -#, c-format msgid "Unable to write" msgstr "Schreiben nicht möglich" -#, c-format msgid "Session overload" msgstr "Sitzung überlastet" -#, c-format msgid "User is too active" msgstr "Benutzer ist zu aktiv" -#, c-format msgid "Too many sessions" msgstr "Zu viele Sitzungen" -#, c-format msgid "Passport not verified" msgstr "Passport (MSN Benutzerausweis) wurde nicht überprüft" -#, c-format msgid "Bad friend file" msgstr "Falsche Friends-Datei" -#, c-format msgid "Not expected" msgstr "Nicht erwartet" -#, c-format msgid "Friendly name changes too rapidly" msgstr "Benutzernamen werden zu oft geändert" -#, c-format msgid "Server too busy" msgstr "Server ist zu beschäftigt" -#, c-format msgid "Authentication failed" msgstr "Authentifizierung fehlgeschlagen" -#, c-format msgid "Not allowed when offline" msgstr "Nicht erlaubt im Offline-Modus" -#, c-format msgid "Not accepting new users" msgstr "Akzeptiert keine neuen Benutzer" -#, c-format msgid "Kids Passport without parental consent" msgstr "Kinder-Passwort ohne die Zustimmung der Eltern" -#, c-format msgid "Passport account not yet verified" msgstr "Passport-Konto wurde noch nicht überprüft" -#, c-format msgid "Passport account suspended" msgstr "Passport-Konto gesperrt" -#, c-format msgid "Bad ticket" msgstr "Falsches Ticket" @@ -5011,6 +4963,13 @@ msgid "Page" msgstr "Nachricht" +msgid "Playing a game" +msgstr "" + +#, fuzzy +msgid "Working" +msgstr "Geschäftlich" + msgid "Has you" msgstr "Hat Sie" @@ -5047,6 +5006,14 @@ msgid "Album" msgstr "Album" +#, fuzzy +msgid "Game Title" +msgstr "Titel anpassen" + +#, fuzzy +msgid "Office Title" +msgstr "Titel anpassen" + msgid "Set Friendly Name..." msgstr "Setze Spitzname..." @@ -5240,8 +5207,8 @@ "Konnte keinerlei Information im Profil des Benutzers finden. Der Benutzer " "existiert wahrscheinlich nicht." -msgid "Profile URL" -msgstr "URL des Profils" +msgid "View web profile" +msgstr "Web-Profil ansehen" #. *< type #. *< ui_requirement @@ -5508,19 +5475,15 @@ msgid "Do you want to delete this buddy from your address book as well?" msgstr "Möchten Sie diesen Buddy außerdem aus Ihrem Adressbuch löschen?" -#. only notify the user about problems adding to the friends list -#. * maybe we should do something else for other lists, but it probably -#. * won't cause too many problems if we just ignore it -#, c-format -msgid "Unable to add \"%s\"." -msgstr "Kann „%s“ nicht hinzufügen." - msgid "The username specified is invalid." msgstr "Der angegebene Benutzername ist ungültig." msgid "This Hotmail account may not be active." msgstr "Dieses Hotmail-Konto ist vielleicht nicht aktiv." +msgid "Profile URL" +msgstr "URL des Profils" + #. *< type #. *< ui_requirement #. *< flags @@ -5556,13 +5519,8 @@ msgid "Logging in" msgstr "Logge ein" -#, c-format -msgid "Connection to server lost (no data received within %d second)" -msgid_plural "Connection to server lost (no data received within %d seconds)" -msgstr[0] "" -"Verbindung zum Server verloren (seit %d Sekunde keine Daten empfangen)" -msgstr[1] "" -"Verbindung zum Server verloren (seit %d Sekunden keine Daten empfangen)" +msgid "Lost connection with server" +msgstr "Verbindung zum Server verloren" #. Can't write _()'d strings in array initializers. Workaround. msgid "New mail messages" @@ -5719,9 +5677,6 @@ msgid "User" msgstr "Benutzer" -msgid "Profile" -msgstr "Profil" - msgid "Headline" msgstr "Überschrift" @@ -6154,7 +6109,6 @@ msgid "Error. SSL support is not installed." msgstr "Fehler. SSL ist nicht installiert." -#, c-format msgid "This conference has been closed. No more messages can be sent." msgstr "" "Diese Konferenz wurde geschlossen. Es können keine Nachrichten mehr gesendet " @@ -6424,23 +6378,18 @@ msgid "Screen Sharing" msgstr "Gemeinsamer Bildschirm" -#, c-format msgid "Free For Chat" msgstr "Bereit zum Chatten" -#, c-format msgid "Not Available" msgstr "Nicht verfügbar" -#, c-format msgid "Occupied" msgstr "Beschäftigt" -#, c-format msgid "Web Aware" msgstr "In Web" -#, c-format msgid "Invisible" msgstr "Unsichtbar" @@ -6731,6 +6680,9 @@ msgid "Member Since" msgstr "Mitglied seit" +msgid "Profile" +msgstr "Profil" + msgid "Your AIM connection may be lost." msgstr "Ihre AIM-Verbindung könnte unterbrochen sein." @@ -6925,11 +6877,9 @@ "beginnen und nur Buchstaben, Ziffern und Leerzeichen enthalten oder nur aus " "Ziffern bestehen." -#, fuzzy msgid "Unable to Add" msgstr "Kann nicht hinzufügen" -#, fuzzy msgid "Unable to Retrieve Buddy List" msgstr "Konnte Buddy-Liste nicht laden" @@ -7139,7 +7089,6 @@ msgid "Attempting to connect to %s:%hu." msgstr "Verbindungsversuch mit %s:%hu." -#, c-format msgid "Attempting to connect via proxy server." msgstr "Verbindungsversuch über einen Proxyserver." @@ -7231,16 +7180,14 @@ msgid "Other" msgstr "Andere" -#, fuzzy msgid "Visible" -msgstr "Unsichtbar" - -msgid "Firend Only" -msgstr "" - -#, fuzzy +msgstr "Sichtbar" + +msgid "Friend Only" +msgstr "" + msgid "Private" -msgstr "Privatsphäre" +msgstr "Privat" msgid "QQ Number" msgstr "QQ-Nummer" @@ -7267,9 +7214,8 @@ msgid "Personal Introduction" msgstr "Persönliche Vorstellung" -#, fuzzy msgid "City/Area" -msgstr "Stadt" +msgstr "Stadt/Gegend" #, fuzzy msgid "Publish Mobile" @@ -7282,11 +7228,9 @@ msgid "College" msgstr "College" -#, fuzzy msgid "Horoscope" -msgstr "Horoskopsymbol" - -#, fuzzy +msgstr "Horoskop" + msgid "Zodiac" msgstr "Sternzeichen" @@ -7302,65 +7246,57 @@ msgid "False" msgstr "Gescheitert" -#, fuzzy msgid "Modify Contact" -msgstr "Konto bearbeiten" - -#, fuzzy +msgstr "Kontakt bearbeiten" + msgid "Modify Address" -msgstr "Privatadresse" - -#, fuzzy +msgstr "Adresse bearbeiten" + msgid "Modify Extended Information" -msgstr "Informationen bearbeiten" - -#, fuzzy +msgstr "Erweiterte Informationen bearbeiten" + msgid "Modify Information" msgstr "Informationen bearbeiten" +msgid "Update" +msgstr "Aktualisieren" + +msgid "Could not change buddy information." +msgstr "Konnte Buddy-Informationen nicht bearbeiten." + +#, c-format +msgid "%u requires verification" +msgstr "%u erfordert Autorisierung" + #, fuzzy -msgid "Update" -msgstr "Letzte Aktualisierung" - -#, fuzzy -msgid "Could not change buddy information." -msgstr "Buddy-Informationen bearbeiten" - -#, c-format -msgid "%d needs Q&A" -msgstr "" - -#, fuzzy -msgid "Add buddy Q&A" -msgstr "Buddy hinzufügen" - -#, fuzzy -msgid "Input answer here" -msgstr "Anfrage hier eingeben" +msgid "Add buddy question" +msgstr "Benutzer zu Ihrer Buddy-Liste hinzufügen?" + +msgid "Enter answer here" +msgstr "Antwort hier eingeben" msgid "Send" msgstr "Senden" -#, fuzzy msgid "Invalid answer." -msgstr "Ungültiger Benutzername." +msgstr "Ungültige Antwort" msgid "Authorization denied message:" msgstr "Nachricht für die Ablehnung der Autorisierung:" #, fuzzy -msgid "Sorry, You are not my style." +msgid "Sorry, you're not my style." msgstr "Tut mir Leid, du bist nicht mein Typ..." #, c-format -msgid "%d needs authentication" -msgstr "%d benötigt Authentifizierung" +msgid "%u needs authorization" +msgstr "%u benötigt Authorisierung" #, fuzzy msgid "Add buddy authorize" msgstr "Benutzer zu Ihrer Buddy-Liste hinzufügen?" -msgid "Input request here" +msgid "Enter request here" msgstr "Anfrage hier eingeben" msgid "Would you be my friend?" @@ -7369,7 +7305,6 @@ msgid "QQ Buddy" msgstr "QQ-Buddy" -#, fuzzy msgid "Add buddy" msgstr "Buddy hinzufügen" @@ -7380,17 +7315,16 @@ msgid "Failed sending authorize" msgstr "Bitte autorisiere mich!" -#, fuzzy, c-format -msgid "Failed removing buddy %d" -msgstr "Kontakt konnte nicht entfernt werden" - -#, fuzzy, c-format +#, c-format +msgid "Failed removing buddy %u" +msgstr "Kontakt %u konnte nicht entfernt werden" + +#, c-format msgid "Failed removing me from %d's buddy list" -msgstr "Von der Liste des Buddys entfernen" - -#, fuzzy +msgstr "Entfernen von %ds Buddy-Liste fehlgeschlagen" + msgid "No reason given" -msgstr "Kein Grund angegeben." +msgstr "Kein Grund angegeben" #. only need to get value #, c-format @@ -7400,9 +7334,9 @@ msgid "Would you like to add him?" msgstr "Möchten Sie ihn hinzufügen?" -#, fuzzy, c-format +#, c-format msgid "Rejected by %s" -msgstr "Anfrage abgelehnt von %s" +msgstr "Abgelehnt von %s" #, c-format msgid "Message: %s" @@ -7423,6 +7357,9 @@ msgid "You can only search for permanent Qun\n" msgstr "Sie können nur nach permanenten Qun suchen\n" +msgid "(Invalid UTF-8 string)" +msgstr "(Ungültige UTF8-Zeichenkette)" + #, fuzzy msgid "Not member" msgstr "Ich bin kein Mitglied" @@ -7442,39 +7379,37 @@ msgid "Notice" msgstr "Bemerkung:" -#, fuzzy msgid "Detail" -msgstr "Standard" +msgstr "Detail" msgid "Creator" msgstr "Ersteller" -#, fuzzy msgid "About me" -msgstr "Über %s" - -#, fuzzy +msgstr "Über mich" + msgid "Category" -msgstr "Chatfehler" +msgstr "Kategorie" msgid "The Qun does not allow others to join" msgstr "Diesen Qun können andere nicht beitreten" -#, fuzzy msgid "Join QQ Qun" -msgstr "Qun betreten" - -#, c-format -msgid "Successfully joined Qun %s (%d)" -msgstr "" - -#, fuzzy +msgstr "QQ-Qun betreten" + +msgid "Input request here" +msgstr "Anfrage hier eingeben" + +#, c-format +msgid "Successfully joined Qun %s (%u)" +msgstr "Qun %s (%u) erfolgreich betreten" + msgid "Successfully joined Qun" -msgstr "Sie haben einen Qun angelegt" - -#, c-format -msgid "Qun %d denied to join" -msgstr "Qun %d hat Ihren Beitritt abgelehnt" +msgstr "Qun erfolgreich betreten" + +#, c-format +msgid "Qun %u denied from joining" +msgstr "Qun %u hat Ihren Beitritt abgelehnt" msgid "QQ Qun Operation" msgstr "QQ-Qun-Operation" @@ -7482,12 +7417,11 @@ msgid "Failed:" msgstr "Gescheitert:" -msgid "Join Qun, Unknow Reply" +msgid "Join Qun, Unknown Reply" msgstr "Qun-Beitritt, Unbekannte Antwort" -#, fuzzy msgid "Quit Qun" -msgstr "QQ-Qun" +msgstr "Qun verlassen" msgid "" "Note, if you are the creator, \n" @@ -7497,52 +7431,49 @@ "wenn Sie der Ersteller sind." #, fuzzy -msgid "Sorry, you are not our style ..." +msgid "Sorry, you are not our style" msgstr "Tut mir Leid, du bist nicht mein Typ..." -#, fuzzy -msgid "Successfully changed Qun member" -msgstr "Qun-Mitglied ändern" - -#, fuzzy +msgid "Successfully changed Qun members" +msgstr "Qun-Mitglieder erfolgreich geändert" + msgid "Successfully changed Qun information" -msgstr "Qun-Informationen bearbeiten" +msgstr "Qun-Informationen erfolgreich bearbeitet" msgid "You have successfully created a Qun" msgstr "Sie haben einen Qun angelegt" -#, fuzzy -msgid "Would you like to set detailed information now?" +msgid "Would you like to set up detailed information now?" msgstr "Möchten Sie jetzt Detail-Informationen einstellen?" msgid "Setup" msgstr "Setup" #, fuzzy, c-format -msgid "%d requested to join Qun %d for %s" -msgstr "%d möchte dem Qun %d beitreten" - -#, c-format -msgid "%d request to join Qun %d" +msgid "%u requested to join Qun %u for %s" msgstr "%d möchte dem Qun %d beitreten" #, c-format -msgid "Failed to join Qun %d, operated by admin %d" -msgstr "Dem Qun %d, moderiert von admin %d, konnte nicht beigetreten werden" - -#, c-format -msgid "Joining Qun %d is approved by admin %d for %s" -msgstr "" +msgid "%u request to join Qun %u" +msgstr "%u möchte dem Qun %u beitreten" + +#, c-format +msgid "Failed to join Qun %u, operated by admin %u" +msgstr "Dem Qun %u, moderiert von admin %u, konnte nicht beigetreten werden" + +#, c-format +msgid "Joining Qun %u is approved by admin %u for %s" +msgstr "" + +#, c-format +msgid "Removed buddy %u." +msgstr "Buddy %u entfernt" #, fuzzy, c-format -msgid "Removed buddy %d." +msgid "New buddy %u joined." msgstr "Buddy entfernen" #, c-format -msgid "New buddy %d joined." -msgstr "" - -#, c-format msgid "Unknown-%d" msgstr "Unbekannt-%d" @@ -7632,15 +7563,15 @@ msgid "Time: %d-%d-%d, %d:%d:%d
\n" msgstr "Anmeldezeit: %s
\n" -#, fuzzy, c-format +#, c-format msgid "IP: %s
\n" -msgstr "Server: %s
\n" +msgstr "IP: %s
\n" msgid "Login Information" msgstr "Login-Informationen" msgid "

Original Author:
\n" -msgstr "" +msgstr "

Original-Autor:
\n" msgid "

Code Contributors:
\n" msgstr "" @@ -7659,13 +7590,12 @@ msgid "Feel free to join us! :)" msgstr "" -#, fuzzy, c-format -msgid "About OpenQ r%s" -msgstr "Über %s" - -#, fuzzy +#, c-format +msgid "About OpenQ %s" +msgstr "Über OpenQ %s" + msgid "Change Icon" -msgstr "Icon speichern" +msgstr "Icon ändern" msgid "Change Password" msgstr "Passwort ändern" @@ -7674,11 +7604,10 @@ msgstr "Kontoinformationen" msgid "Update all QQ Quns" -msgstr "" - -#, fuzzy +msgstr "Alle QQ-Quns aktualisieren" + msgid "About OpenQ" -msgstr "Über %s" +msgstr "Über OpenQ" #. *< type #. *< ui_requirement @@ -7690,27 +7619,24 @@ #. *< version #. * summary #. * description -#, fuzzy msgid "QQ Protocol Plugin" msgstr "QQ-Protokoll-Plugin" msgid "Auto" msgstr "Auto" -#, fuzzy msgid "Select Server" -msgstr "Benutzer wählen" +msgstr "Server wählen" msgid "QQ2005" -msgstr "" +msgstr "QQ2005" msgid "QQ2007" -msgstr "" +msgstr "QQ2007" msgid "QQ2008" -msgstr "" - -#. #endif +msgstr "QQ2008" + msgid "Connect by TCP" msgstr "Über TCP verbinden" @@ -7720,21 +7646,14 @@ msgid "Show server news" msgstr "Server-News anzeigen" -#, fuzzy msgid "Keep alive interval (seconds)" -msgstr "Intervall(e) zum Aufrechterhalten der Verbindung (Keep alive)" - -#, fuzzy +msgstr "Intervall zum Aufrechterhalten der Verbindung (Sekunden)" + msgid "Update interval (seconds)" -msgstr "Aktualisierungsintervall(e)" - -#, fuzzy -msgid "Can not decrypt server reply" -msgstr "Kann die Antwort der Anmeldung nicht entschlüsseln" - -#, fuzzy -msgid "Can not decrypt get server reply" -msgstr "Kann die Antwort der Anmeldung nicht entschlüsseln" +msgstr "Aktualisierungsintervall (Sekunden)" + +msgid "Cannot decrypt server reply" +msgstr "Kann die Antwort des Servers nicht entschlüsseln" #, c-format msgid "Failed requesting token, 0x%02X" @@ -7751,26 +7670,27 @@ #. need activation #. need activation #. need activation -#, fuzzy msgid "Activation required" -msgstr "Registrierung erforderlich" +msgstr "Aktivierung erforderlich" #, fuzzy, c-format -msgid "Unknow reply code when login (0x%02X)" +msgid "Unknown reply code when logging in (0x%02X)" msgstr "Anmeldung nicht möglich, unbekannter Antwort-Code 0x%02X" -msgid "Keep alive error" -msgstr "Fehler beim Aufrechterhalten der Verbindung (Keep alive)" +msgid "Could not decrypt server reply" +msgstr "Konnte die Antwort des Servers nicht entschlüsseln" #, fuzzy -msgid "Requesting captcha ..." +msgid "Requesting captcha" msgstr "Bitte um %ss Aufmerksamkeit..." -msgid "Checking code of captcha ..." -msgstr "" - -msgid "Failed captcha verify" -msgstr "" +#, fuzzy +msgid "Checking captcha" +msgstr "Bitte um %ss Aufmerksamkeit..." + +#, fuzzy +msgid "Failed captcha verification" +msgstr "Yahoo-Authentifizierung fehlgeschlagen" #, fuzzy msgid "Captcha Image" @@ -7780,22 +7700,22 @@ msgid "Enter code" msgstr "Geben Sie ein Passwort ein" -msgid "QQ Captcha Verifing" -msgstr "" - #, fuzzy +msgid "QQ Captcha Verification" +msgstr "SSL-Zertifikatsüberprüfung" + msgid "Enter the text from the image" -msgstr "Bitte geben Sie den Namen der Gruppe ein" - -#, c-format -msgid "Unknow reply code when checking password (0x%02X)" -msgstr "" - -#, c-format -msgid "" -"Unknow reply code when login (0x%02X):\n" +msgstr "Bitte geben Sie den Text aus dem Bild ein" + +#, fuzzy, c-format +msgid "Unknown reply when checking password (0x%02X)" +msgstr "Anmeldung nicht möglich, unbekannter Antwort-Code 0x%02X" + +#, fuzzy, c-format +msgid "" +"Unknown reply code when logging in (0x%02X):\n" "%s" -msgstr "" +msgstr "Anmeldung nicht möglich, unbekannter Antwort-Code 0x%02X" #. we didn't successfully connect. tdt->toc_fd is valid here msgid "Unable to connect." @@ -7804,14 +7724,6 @@ msgid "Socket error" msgstr "Socket-Fehler" -#, c-format -msgid "" -"Lost connection with server:\n" -"%d, %s" -msgstr "" -"Verbindung zum Server verloren:\n" -"%d, %s" - msgid "Unable to read from socket" msgstr "Socket kann nicht gelesen werden" @@ -7822,10 +7734,11 @@ msgstr "Verbindung verloren" #, fuzzy -msgid "Get server ..." +msgid "Getting server" msgstr "Benutzer-Info setzen..." -msgid "Request token" +#, fuzzy +msgid "Requesting token" msgstr "Anfragekürzel" msgid "Couldn't resolve host" @@ -7834,23 +7747,27 @@ msgid "Invalid server or port" msgstr "Ungültiger Server oder Port" -#, fuzzy -msgid "Connecting server ..." -msgstr "Verbindungsserver" +msgid "Connecting to server" +msgstr "Verbinde mit Server" msgid "QQ Error" msgstr "QQ-Fehler" -msgid "Failed to send IM." -msgstr "Senden der Nachricht fehlgeschlagen." - -#, fuzzy, c-format +#, c-format msgid "" "Server News:\n" "%s\n" "%s\n" "%s" -msgstr "QQ-Server-News" +msgstr "" +"Server-News:\n" +"%s\n" +"%s\n" +"%s" + +#, c-format +msgid "%s:%s" +msgstr "%s:%s" #, c-format msgid "From %s:" @@ -7862,13 +7779,13 @@ "%s" msgstr "Anleitung vom Server: %s" -msgid "Unknow SERVER CMD" +msgid "Unknown SERVER CMD" msgstr "Unbekanntes SERVER-CMD" -#, c-format +#, fuzzy, c-format msgid "" "Error reply of %s(0x%02X)\n" -"Room %d, reply 0x%02X" +"Room %u, reply 0x%02X" msgstr "" "Fehlerantwort %s(0x%02X)\n" "Raum %d, Antwort 0x%02X" @@ -7876,20 +7793,14 @@ msgid "QQ Qun Command" msgstr "QQ-Qun-Kommando" -#, fuzzy, c-format -msgid "Not a member of room \"%s\"\n" -msgstr "Sie sind kein Mitglied des Qun „%s“\n" - -msgid "Can not decrypt login reply" -msgstr "Kann die Antwort der Anmeldung nicht entschlüsseln" - -#, fuzzy -msgid "Unknow LOGIN CMD" -msgstr "Unbekanntes Antwort-CMD" - -#, fuzzy -msgid "Unknow CLIENT CMD" -msgstr "Unbekanntes SERVER-CMD" +msgid "Could not decrypt login reply" +msgstr "Konnte die Antwort der Anmeldung nicht entschlüsseln" + +msgid "Unknown LOGIN CMD" +msgstr "Unbekanntes LOGIN-CMD" + +msgid "Unknown CLIENT CMD" +msgstr "Unbekanntes CLIENT-CMD" #, c-format msgid "%d has declined the file %s" @@ -8502,7 +8413,6 @@ msgid "
Channel Topic:
%s" msgstr "
Thema des Kanals:
%s" -#, c-format msgid "
Channel Modes: " msgstr "
Kanal-Modi: " @@ -8527,7 +8437,6 @@ msgid "Channel Public Keys List" msgstr "Liste der öffentlichen Schlüssel des Kanals" -#, c-format msgid "" "Channel authentication is used to secure the channel from unauthorized " "access. The authentication may be based on passphrase and digital " @@ -8932,7 +8841,6 @@ msgid "Your Current Mood" msgstr "Ihre momentane Stimmung" -#, c-format msgid "Normal" msgstr "Normal" @@ -9318,47 +9226,37 @@ msgid "No server statistics available" msgstr "Keine Serverstatistik verfügbar" -#, c-format msgid "Failure: Version mismatch, upgrade your client" msgstr "Fehler: Unterschiedliche Version, aktualisieren Sie Ihren Client" -#, c-format msgid "Failure: Remote does not trust/support your public key" msgstr "" "Fehler: Die entfernte Seite vertraut Ihrem öffentlichen Schlüssel nicht" -#, c-format msgid "Failure: Remote does not support proposed KE group" msgstr "" "Fehler: Entferntes Programm unterstützt nicht die vorgeschlagen KE-Gruppe" -#, c-format msgid "Failure: Remote does not support proposed cipher" msgstr "" "Fehler: Entferntes Programm unterstützt die vorgeschlagene Cipher nicht" -#, c-format msgid "Failure: Remote does not support proposed PKCS" msgstr "Fehler: Entferntes Programm unterstützt die vorgeschlagene PKCS nicht" -#, c-format msgid "Failure: Remote does not support proposed hash function" msgstr "" "Fehler: Entferntes Programm unterstützt die vorgeschlagen Hashfunktion nicht" -#, c-format msgid "Failure: Remote does not support proposed HMAC" msgstr "Fehler: Entferntes Programm unterstützt das vorgeschlagene HMAC nicht" -#, c-format msgid "Failure: Incorrect signature" msgstr "Fehler: Falsche Signatur" -#, c-format msgid "Failure: Invalid cookie" msgstr "Fehler: Ungültiger Cookie" -#, c-format msgid "Failure: Authentication failed" msgstr "Fehler: Authentifizierung fehlgeschlagen" @@ -9455,7 +9353,6 @@ msgid "Warning of %s not allowed." msgstr "Verwarnung von %s nicht erlaubt." -#, c-format msgid "A message has been dropped, you are exceeding the server speed limit." msgstr "" "Eine Nachricht ging verloren. Sie überschreiten die Geschwindigkeitsgrenze " @@ -9479,39 +9376,30 @@ "Eine Nachricht von %s hat Sie nicht erreicht, da sie zu schnell gesendet " "wurde." -#, c-format msgid "Failure." msgstr "Fehler." -#, c-format msgid "Too many matches." msgstr "Zu viele Übereinstimmungen." -#, c-format msgid "Need more qualifiers." msgstr "Benötige mehr Angaben." -#, c-format msgid "Dir service temporarily unavailable." msgstr "Verzeichnis-Dienst ist zur Zeit nicht verfügbar." -#, c-format msgid "Email lookup restricted." msgstr "E-Mail-Suche eingeschränkt." -#, c-format msgid "Keyword ignored." msgstr "Stichwort ignoriert." -#, c-format msgid "No keywords." msgstr "Keine Stichwörter." -#, c-format msgid "User has no directory information." msgstr "Der Benutzer hat kein Profil." -#, c-format msgid "Country not supported." msgstr "Land nicht unterstützt." @@ -9519,19 +9407,15 @@ msgid "Failure unknown: %s." msgstr "Unbekannter Fehler: %s." -#, c-format msgid "Incorrect username or password." msgstr "Ungültiger Benutzername oder Passwort." -#, c-format msgid "The service is temporarily unavailable." msgstr "Der Dienst ist zur Zeit nicht verfügbar." -#, c-format msgid "Your warning level is currently too high to log in." msgstr "Ihre Warnstufe ist zur Zeit zu hoch, um sich anzumelden." -#, c-format msgid "" "You have been connecting and disconnecting too frequently. Wait ten minutes " "and try again. If you continue to try, you will need to wait even longer." @@ -9891,13 +9775,9 @@ msgid "Last Update" msgstr "Letzte Aktualisierung" -#, c-format -msgid "User information for %s unavailable" -msgstr "Benutzerinformation für %s nicht verfügbar" - -msgid "" -"Sorry, this profile seems to be in a language or format that is not " -"supported at this time." +#, fuzzy +msgid "" +"This profile is in a language or format that is not supported at this time." msgstr "" "Entschuldigung, das Profil enthält eine Sprache, die zur Zeit nicht " "unterstützt wird." @@ -10372,29 +10252,24 @@ msgstr " (%s)" #. 10053 -#, c-format msgid "Connection interrupted by other software on your computer." msgstr "" "Die Verbindung wurde von einer anderen Software auf ihrem Computer " "unterbrochen." #. 10054 -#, c-format msgid "Remote host closed connection." msgstr "Der entfernte Host hat die Verbindung beendet." #. 10060 -#, c-format msgid "Connection timed out." msgstr "Verbindungsabbruch wegen Zeitüberschreitung." #. 10061 -#, c-format msgid "Connection refused." msgstr "Verbindung abgelehnt." #. 10048 -#, c-format msgid "Address already in use." msgstr "Adresse wird bereits benutzt." @@ -10966,9 +10841,8 @@ msgid "Auto_join when account becomes online." msgstr "Automatisch _beitreten, wenn das Konto online geht." -#, fuzzy msgid "_Remain in chat after window is closed." -msgstr "_Chat verstecken, wenn das Fenster geschlossen wird." +msgstr "In _Chat bleiben, nachdem das Fenster geschlossen wird." msgid "Please enter the name of the group to be added." msgstr "Bitte geben Sie den Namen der Gruppe ein, die hinzugefügt werden soll." @@ -11626,7 +11500,6 @@ "geschützt. Die Datei 'COPYRIGHT' enthält die komplette Liste der " "Mitwirkenden. Wir übernehmen keine Haftung für dieses Programm.

" -#, c-format msgid "IRC: #pidgin on irc.freenode.net

" msgstr "IRC: #pidgin auf irc.freenode.net

" @@ -11994,11 +11867,9 @@ msgid "Save Image" msgstr "Bild speichern" -#, c-format msgid "_Save Image..." msgstr "Bild _speichern..." -#, c-format msgid "_Add Custom Smiley..." msgstr "Benutzerdefinierten Smiley _hinzufügen..." @@ -12260,7 +12131,7 @@ " nur das erste Konto aktiviert).\n" " -v, --version zeigt aktuelle Version und beendet das Programm\n" -#, fuzzy, c-format +#, c-format msgid "" "%s %s has segfaulted and attempted to dump a core file.\n" "This is a bug in the software and has happened through\n" @@ -12288,11 +12159,6 @@ "der Core-Datei. Falls Sie nicht wissen, wie man einen \n" "Backtrace erstellt, lesen Sie bitte die Informationen auf \n" "%swiki/GetABacktrace\n" -"\n" -"Wenn Sie weitere Hilfe benötigen, kontaktieren sie bitte \n" -"SeanEgn oder LSchiere (über AIM). Kontaktinformationen \n" -"für Sean und Luke über andere Protokolle finden Sie unter \n" -"%swiki/DeveloperPages\n" #. Translators may want to transliterate the name. #. It is not to be translated. @@ -12718,27 +12584,21 @@ msgid "Sound Selection" msgstr "Klang-Auswahl" -#, c-format msgid "Quietest" msgstr "Am leisesten" -#, c-format msgid "Quieter" msgstr "Leiser" -#, c-format msgid "Quiet" msgstr "Leise" -#, c-format msgid "Loud" msgstr "Laut" -#, c-format msgid "Louder" msgstr "Lauter" -#, c-format msgid "Loudest" msgstr "Am lautesten" @@ -13139,13 +12999,11 @@ msgid "_Invite" msgstr "_Einladen" -#, fuzzy msgid "_Modify..." -msgstr "_Bearbeiten" - -#, fuzzy +msgstr "_Bearbeiten..." + msgid "_Add..." -msgstr "_Hinzufügen" +msgstr "_Hinzufügen..." msgid "_Open Mail" msgstr "Mail ö_ffnen" @@ -13168,12 +13026,11 @@ msgid "none" msgstr "keine" -#, fuzzy msgid "Small" -msgstr "E-Mail" +msgstr "Klein" msgid "Smaller versions of the default smilies" -msgstr "" +msgstr "Kleinere Versionen der Default-Smileys" msgid "Response Probability:" msgstr "Antwortwahrscheinlichkeit:" @@ -13760,7 +13617,6 @@ msgid "Select Color" msgstr "Farbe auswählen" -#, c-format msgid "Select Interface Font" msgstr "Schriftart wählen" @@ -13835,18 +13691,16 @@ #, c-format msgid "You can upgrade to %s %s today." -msgstr "" +msgstr "Sie können heute auf %s %s aktualisieren." msgid "New Version Available" msgstr "Neue Version verfügbar" -#, fuzzy msgid "Later" -msgstr "Datum" - -#, fuzzy +msgstr "Später" + msgid "Download Now" -msgstr "Download %s: %s" +msgstr "Jetzt herunterladen" #. *< type #. *< ui_requirement @@ -13987,7 +13841,6 @@ msgid "Timestamp Format Options" msgstr "Zeitstempelformat-Optionen" -#, c-format msgid "_Force 24-hour time format" msgstr "_Erzwinge 24-Stunden Zeitformat" @@ -14158,169 +14011,3 @@ msgid "This plugin is useful for debbuging XMPP servers or clients." msgstr "" "Dieses Plugin ist nützlich zur Fehlersuche in XMPP-Servern oder -Clients." - -#~ msgid "Primary Information" -#~ msgstr "Primäre Informationen" - -#~ msgid "Blood Type" -#~ msgstr "Blutgruppe" - -#~ msgid "Update information" -#~ msgstr "Informationen aktualisieren" - -#~ msgid "Successed:" -#~ msgstr "Erfolgreich:" - -#~ msgid "" -#~ "Setting custom faces is not currently supported. Please choose an image " -#~ "from %s." -#~ msgstr "" -#~ "Das Setzen von benutzerdefinierten Gesichtern wird momentan nicht " -#~ "unterstützt. Bitte wählen Sie ein Bild von %s." - -#~ msgid "Invalid QQ Face" -#~ msgstr "Ungültiges QQ-Gesicht" - -# c-format -#~ msgid "You rejected %d's request" -#~ msgstr "Sie haben die Anfrage von %d abgelehnt" - -#~ msgid "Reject request" -#~ msgstr "Anfrage ablehnen" - -#~ msgid "Add buddy with auth request failed" -#~ msgstr "Benutzer hinzufügen, wenn Autorisierungsanfrage fehlschlug" - -#~ msgid "Add into %d's buddy list" -#~ msgstr "Zu %ds Buddy-Liste hinzufügen" - -#~ msgid "QQ Number Error" -#~ msgstr "Fehler in QQ-Nummer" - -#~ msgid "Group Description" -#~ msgstr "Gruppenbeschreibung" - -#~ msgid "Auth" -#~ msgstr "Autorisieren" - -#~ msgid "Approve" -#~ msgstr "Akzeptieren" - -#~ msgid "Successed to join Qun %d, operated by admin %d" -#~ msgstr "Erfolgreicher Beitritt in den Qun %d, moderiert vom Admin %d" - -#~ msgid "[%d] removed from Qun \"%d\"" -#~ msgstr "[%d] vom Qun „%d“ entfernt" - -#~ msgid "[%d] added to Qun \"%d\"" -#~ msgstr "[%d] zum Qun „%d“ hinzugefügt" - -#~ msgid "I am a member" -#~ msgstr "Ich bin Mitglied" - -#~ msgid "I am requesting" -#~ msgstr "Ich frage an" - -#~ msgid "I am the admin" -#~ msgstr "Ich bin der Admin" - -#~ msgid "Unknown status" -#~ msgstr "Unbekannter Status" - -#~ msgid "Remove from Qun" -#~ msgstr "vom Qun entfernen" - -#~ msgid "You entered a group ID outside the acceptable range" -#~ msgstr "" -#~ "Sie haben eine Gruppen-ID außerhalb des erlaubten Bereichs angegeben" - -#~ msgid "Are you sure you want to leave this Qun?" -#~ msgstr "Wollen Sie dieses Qun wirklich verlassen?" - -#~ msgid "Do you want to approve the request?" -#~ msgstr "Wollen sie die Anfrage akzeptieren?" - -#~ msgid "" -#~ "%s\n" -#~ "\n" -#~ "%s" -#~ msgstr "" -#~ "%s\n" -#~ "\n" -#~ "%s" - -#~ msgid "System Message" -#~ msgstr "Systemnachricht" - -#~ msgid "Last Login IP: %s
\n" -#~ msgstr "Letzte Anmelde-IP: %s
\n" - -#~ msgid "Last Login Time: %s\n" -#~ msgstr "Letzte Anmeldezeit: %s\n" - -#~ msgid "Set My Information" -#~ msgstr "Meine Informationen festlegen" - -#~ msgid "Leave the QQ Qun" -#~ msgstr "Diesen QQ-Qun verlassen" - -#~ msgid "Block this buddy" -#~ msgstr "Diesen Buddy blockieren" - -#~ msgid "Invalid token reply code, 0x%02X" -#~ msgstr "Ungültiger Token-Antwort-Code, 0x%02X" - -#~ msgid "Unable login for not support Redirect_EX now" -#~ msgstr "Anmeldung nicht möglich, Redirect_EX wird noch nicht unterstützt" - -#~ msgid "Error password: %s" -#~ msgstr "Passwort-Fehler: %s" - -#~ msgid "Need active: %s" -#~ msgstr "Brauche aktiv: %s" - -#~ msgid "Failed to connect all servers" -#~ msgstr "Konnte nicht alle Server verbinden" - -#~ msgid "Connecting server %s, retries %d" -#~ msgstr "Verbinde zu Server %s, %d Wiederholungen" - -#~ msgid "Do you approve the requestion?" -#~ msgstr "Wollen sie die Anfrage akzeptieren?" - -#~ msgid "Do you add the buddy?" -#~ msgstr "Möchten Sie diesen Buddy hinzufügen?" - -#~ msgid "%s added you [%s] to buddy list" -#~ msgstr "%s hat Sie [%s] zur Buddy-Liste hinzugefügt" - -#~ msgid "QQ Budy" -#~ msgstr "QQ-Buddy" - -#~ msgid "Requestion approved by %s" -#~ msgstr "Anfrage akzeptiert von %s" - -#~ msgid "%s wants to add you [%s] as a friend" -#~ msgstr "%s möchte Sie [%s] als Freund hinzufügen" - -#~ msgid "%s is not in buddy list" -#~ msgstr "%s ist nicht in der Buddy-Liste" - -#~ msgid "Would you add?" -#~ msgstr "Möchten Sie ihn hinzufügen?" - -#~ msgid "%s" -#~ msgstr "%s" - -#~ msgid "QQ Server Notice" -#~ msgstr "QQ-Server-Nachricht" - -#~ msgid "" -#~ "You are using %s version %s. The current version is %s. You can get it " -#~ "from %s


" -#~ msgstr "" -#~ "Sie verwenden gerade %s Version %s. Die aktuelle Version ist %s. Sie " -#~ "können Pidgin von %s herunterladen.
" - -#~ msgid "ChangeLog:
%s" -#~ msgstr "Änderungen:
%s"