Mercurial > pidgin
diff libpurple/protocols/yahoo/libymsg.c @ 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 | 2b9db39bd7ed |
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: