Mercurial > pidgin
changeset 29002:d1cecbc467c6
Support Yahoo !PingBox. Includes a couple warning fixes. Fixes #7347.
committer: John Bailey <rekkanoryo@rekkanoryo.org>
author | kartikmohta@gmail.com |
---|---|
date | Tue, 09 Feb 2010 06:19:49 +0000 |
parents | fa35d7029a14 |
children | 8594fde2ace3 |
files | libpurple/protocols/yahoo/libymsg.c libpurple/protocols/yahoo/libymsg.h libpurple/protocols/yahoo/util.c libpurple/protocols/yahoo/yahoo_friend.c |
diffstat | 4 files changed, 20 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/yahoo/libymsg.c Tue Feb 09 01:51:25 2010 +0000 +++ b/libpurple/protocols/yahoo/libymsg.c Tue Feb 09 06:19:49 2010 +0000 @@ -541,6 +541,9 @@ case YAHOO_FEDERATION_IBM: norm_bud = g_strconcat("ibm/", temp, NULL); break; + case YAHOO_FEDERATION_PBX: + norm_bud = g_strconcat("pbx/", temp, NULL); + break; case YAHOO_FEDERATION_NONE: norm_bud = g_strdup(temp); break; @@ -833,6 +836,9 @@ case YAHOO_FEDERATION_IBM: fed_from = g_strconcat("ibm/", from, NULL); break; + case YAHOO_FEDERATION_PBX: + fed_from = g_strconcat("pbx/", from, NULL); + break; case YAHOO_FEDERATION_NONE: default: break; @@ -844,7 +850,7 @@ serv_got_typing_stopped(gc, fed_from); if (fed_from != from) - g_free(fed_from); + g_free(fed_from); } else if (!g_ascii_strncasecmp(msg, "GAME", strlen("GAME"))) { PurpleBuddy *bud = purple_find_buddy(account, from); @@ -999,6 +1005,9 @@ case YAHOO_FEDERATION_IBM: im->fed_from = g_strconcat("ibm/",im->from, NULL); break; + case YAHOO_FEDERATION_PBX: + im->fed_from = g_strconcat("pbx/",im->from, NULL); + break; case YAHOO_FEDERATION_NONE: default: im->fed_from = g_strdup(im->from); @@ -1010,7 +1019,7 @@ /* peer session id */ if (im && (pair->key == 11)) { /* disconnect the peer if connected through p2p and sends wrong value for session id */ - if( (im->fed == YAHOO_FEDERATION_NONE) && (pkt_type == YAHOO_PKT_TYPE_P2P) + if( (im->fed == YAHOO_FEDERATION_NONE) && (pkt_type == YAHOO_PKT_TYPE_P2P) && (yd->session_id != strtol(pair->value, NULL, 10)) ) { purple_debug_warning("yahoo","p2p: %s sent us message with wrong session id. Disconnecting p2p connection to peer\n", im->fed_from); @@ -4428,6 +4437,7 @@ case YAHOO_FEDERATION_MSN: case YAHOO_FEDERATION_OCS: case YAHOO_FEDERATION_IBM: + case YAHOO_FEDERATION_PBX: fed_who += 4; break; case YAHOO_FEDERATION_NONE: @@ -4528,6 +4538,7 @@ case YAHOO_FEDERATION_MSN: case YAHOO_FEDERATION_OCS: case YAHOO_FEDERATION_IBM: + case YAHOO_FEDERATION_PBX: fed_who += 4; break; case YAHOO_FEDERATION_NONE:
--- a/libpurple/protocols/yahoo/libymsg.h Tue Feb 09 01:51:25 2010 +0000 +++ b/libpurple/protocols/yahoo/libymsg.h Tue Feb 09 06:19:49 2010 +0000 @@ -138,7 +138,8 @@ YAHOO_FEDERATION_NONE = 0, /* No federation - Yahoo! network */ YAHOO_FEDERATION_OCS = 1, /* LCS or OCS private networks */ YAHOO_FEDERATION_MSN = 2, /* MSN or Windows Live network */ - YAHOO_FEDERATION_IBM = 9 /* IBM/Sametime network */ + YAHOO_FEDERATION_IBM = 9, /* IBM/Sametime network */ + YAHOO_FEDERATION_PBX = 100 /* Yahoo! Pingbox service */ } YahooFederation;
--- a/libpurple/protocols/yahoo/util.c Tue Feb 09 01:51:25 2010 +0000 +++ b/libpurple/protocols/yahoo/util.c Tue Feb 09 06:19:49 2010 +0000 @@ -932,6 +932,8 @@ fed = YAHOO_FEDERATION_OCS; else if (!g_ascii_strncasecmp(who, "ibm", 3)) fed = YAHOO_FEDERATION_IBM; + else if (!g_ascii_strncasecmp(who, "pbx", 3)) + fed = YAHOO_FEDERATION_PBX; } return fed; }
--- a/libpurple/protocols/yahoo/yahoo_friend.c Tue Feb 09 01:51:25 2010 +0000 +++ b/libpurple/protocols/yahoo/yahoo_friend.c Tue Feb 09 06:19:49 2010 +0000 @@ -186,6 +186,9 @@ case YAHOO_FEDERATION_IBM: who = g_strconcat("ibm/", temp, NULL); break; + case YAHOO_FEDERATION_PBX: + who = g_strconcat("pbx/", temp, NULL); + break; case YAHOO_FEDERATION_NONE: who = g_strdup(temp); break;