# HG changeset patch # User Ka-Hing Cheung # Date 1231712843 0 # Node ID 7d6866244106e9b20cee3faf14a9bd3f1b2b0257 # Parent a67ac9a3fd0534c75eef0fa77a17ffe6bb02f09a make this togglable via env rather than #define diff -r a67ac9a3fd05 -r 7d6866244106 libpurple/protocols/msn/msn.c --- a/libpurple/protocols/msn/msn.c Sun Jan 11 22:03:34 2009 +0000 +++ b/libpurple/protocols/msn/msn.c Sun Jan 11 22:27:23 2009 +0000 @@ -1343,6 +1343,7 @@ { PurpleConnection *gc; MsnSession *session; + GSList *list, *l; gc = purple_account_get_connection(account); @@ -1351,6 +1352,17 @@ session = gc->proto_data; msn_change_status(session); } + + /* fake it to ourselves */ + if((list = purple_find_buddies(account, + purple_account_get_username(account))) == NULL) + return; + + for(l = list; l != NULL; l = l->next) { + purple_blist_update_buddy_status(l->data, status); + } + + g_slist_free(list); } static void diff -r a67ac9a3fd05 -r 7d6866244106 libpurple/protocols/msn/soap.c --- a/libpurple/protocols/msn/soap.c Sun Jan 11 22:03:34 2009 +0000 +++ b/libpurple/protocols/msn/soap.c Sun Jan 11 22:27:23 2009 +0000 @@ -68,6 +68,7 @@ GQueue *queue; MsnSoapRequest *current_request; + gboolean unsafe_debug; } MsnSoapConnection; static gboolean msn_soap_connection_run(gpointer data); @@ -79,6 +80,7 @@ conn->session = session; conn->host = g_strdup(host); conn->queue = g_queue_new(); + conn->unsafe_debug = g_getenv("PURPLE_MSN_UNSAFE_DEBUG") != NULL; return conn; } @@ -504,12 +506,10 @@ if (cnt < 0 && perrno != EAGAIN) purple_debug_info("soap", "read: %s\n", g_strerror(perrno)); -#ifndef MSN_UNSAFE_DEBUG - if (conn->current_request && conn->current_request->secure) + if (conn->current_request && conn->current_request->secure && + !conn->unsafe_debug) purple_debug_misc("soap", "Received secure request.\n"); - else -#endif - if (count != 0) + else if (count != 0) purple_debug_misc("soap", "current %s\n", conn->buf->str + cursor); /* && count is necessary for Adium, on OS X the last read always @@ -657,12 +657,10 @@ g_string_append(conn->buf, "\r\n"); g_string_append(conn->buf, body); -#ifndef MSN_UNSAFE_DEBUG - if (req->secure) + if (req->secure && !conn->unsafe_debug) purple_debug_misc("soap", "Sending secure request.\n"); else -#endif - purple_debug_misc("soap", "%s\n", conn->buf->str); + purple_debug_misc("soap", "%s\n", conn->buf->str); conn->handled_len = 0; conn->current_request = req;