Revision 9f0179fed9ae1b60f4e57538e7885517fc159079
markdoliner at pidgin.im
markdoliner at pidgin.im
Sun Mar 25 03:07:44 EDT 2007
o -----------------------------------------------------------------
| Revision: 9f0179fed9ae1b60f4e57538e7885517fc159079
| Ancestor: b6bc31e96f744fe3a330381179f063ad1832253e
| Author: markdoliner at pidgin.im
| Date: 2007-03-25T07:07:29
| Branch: im.pidgin.pidgin
|
| Modified files:
| libpurple/protocols/jabber/jabber.c
| libpurple/protocols/jabber/message.c
|
| ChangeLog:
|
| Minor code cleanup
|
| ============================================================
| --- libpurple/protocols/jabber/jabber.c e533728a16a47f804a08f3b36f19268f88513356
| +++ libpurple/protocols/jabber/jabber.c 216a72386e4662a131d14dadc3108d12edbb286a
| @@ -171,12 +171,16 @@ void jabber_process_packet(JabberStream
|
| void jabber_process_packet(JabberStream *js, xmlnode *packet)
| {
| + const char *xmlns;
| +
| purple_signal_emit(my_protocol, "jabber-receiving-xmlnode", js->gc, &packet);
|
| /* if the signal leaves us with a null packet, we're done */
| if(NULL == packet)
| return;
|
| + xmlns = xmlnode_get_namespace(packet);
| +
| if(!strcmp(packet->name, "iq")) {
| jabber_iq_parse(js, packet);
| } else if(!strcmp(packet->name, "presence")) {
| @@ -185,14 +189,14 @@ void jabber_process_packet(JabberStream
| jabber_message_parse(js, packet);
| } else if(!strcmp(packet->name, "stream:features")) {
| jabber_stream_features_parse(js, packet);
| - } else if (!strcmp(packet->name, "features") &&
| - !strcmp(xmlnode_get_namespace(packet), "http://etherx.jabber.org/streams")) {
| + } else if (!strcmp(packet->name, "features") &&
| + !strcmp(xmlns, "http://etherx.jabber.org/streams")) {
| jabber_stream_features_parse(js, packet);
| - } else if(!strcmp(packet->name, "stream:error")) {
| + } else if(!strcmp(packet->name, "stream:error") ||
| + (!strcmp(packet->name, "error") &&
| + !strcmp(xmlns, "http://etherx.jabber.org/streams")))
| + {
| jabber_stream_handle_error(js, packet);
| - } else if (!strcmp(packet->name, "error") &&
| - !strcmp(xmlnode_get_namespace(packet), "http://etherx.jabber.org/streams")) {
| - jabber_stream_handle_error(js, packet);
| } else if(!strcmp(packet->name, "challenge")) {
| if(js->state == JABBER_STREAM_AUTHENTICATING)
| jabber_auth_handle_challenge(js, packet);
| @@ -1530,7 +1534,7 @@ char *jabber_parse_error(JabberStream *j
| }
| } else if(!strcmp(packet->name, "stream:error") ||
| (!strcmp(packet->name, "error") &&
| - !strcmp(xmlnode_get_namespace(packet), "http://etherx.jabber.org/streams"))) {
| + !strcmp(xmlns, "http://etherx.jabber.org/streams"))) {
| if(xmlnode_get_child(packet, "bad-format")) {
| text = _("Bad Format");
| } else if(xmlnode_get_child(packet, "bad-namespace-prefix")) {
| ============================================================
| --- libpurple/protocols/jabber/message.c 53023e5c4606652ab086b4add180a88e51f10dda
| +++ libpurple/protocols/jabber/message.c a716b063289753b851a467985a1063ff3742664a
| @@ -33,7 +33,7 @@ void jabber_message_free(JabberMessage *
|
| void jabber_message_free(JabberMessage *jm)
| {
| - g_free(jm->from);
| + g_free(jm->from);
| g_free(jm->to);
| g_free(jm->id);
| g_free(jm->subject);
To get the patch for this revision, please do this:
mtn log --last 1 --diffs --from 9f0179fed9ae1b60f4e57538e7885517fc159079
More information about the Commits
mailing list