Mercurial > pidgin
comparison libpurple/protocols/jabber/presence.c @ 24559:10ab5441572f
patch from darkrain42 that fixes a crash with a broken server, we probably
should have an util function that does string equality check but doesn't
crash on NULL. Too bad g_str_equal doesn't do that
Fixes #6972
author | Ka-Hing Cheung <khc@hxbc.us> |
---|---|
date | Sat, 29 Nov 2008 01:35:02 +0000 |
parents | 39841a84c944 |
children | 61e0924de04a 25e2ab1fff1d e1f363f8fd6b 6f94b4a27372 |
comparison
equal
deleted
inserted
replaced
24558:e2e57d3c0578 | 24559:10ab5441572f |
---|---|
511 g_free(p); | 511 g_free(p); |
512 } | 512 } |
513 } else if(!strcmp(y->name, "delay") && !strcmp(xmlns, "urn:xmpp:delay")) { | 513 } else if(!strcmp(y->name, "delay") && !strcmp(xmlns, "urn:xmpp:delay")) { |
514 /* XXX: compare the time. jabber:x:delay can happen on presence packets that aren't really and truly delayed */ | 514 /* XXX: compare the time. jabber:x:delay can happen on presence packets that aren't really and truly delayed */ |
515 delayed = TRUE; | 515 delayed = TRUE; |
516 } else if(!strcmp(y->name, "c") && !strcmp(xmlns, "http://jabber.org/protocol/caps")) { | 516 } else if(xmlns && !strcmp(y->name, "c") && !strcmp(xmlns, "http://jabber.org/protocol/caps")) { |
517 caps = y; /* store for later, when creating buddy resource */ | 517 caps = y; /* store for later, when creating buddy resource */ |
518 } else if(!strcmp(y->name, "x")) { | 518 } else if(!strcmp(y->name, "x")) { |
519 const char *xmlns = xmlnode_get_namespace(y); | 519 const char *xmlns = xmlnode_get_namespace(y); |
520 if(xmlns && !strcmp(xmlns, "jabber:x:delay")) { | 520 if(xmlns && !strcmp(xmlns, "jabber:x:delay")) { |
521 /* XXX: compare the time. jabber:x:delay can happen on presence packets that aren't really and truly delayed */ | 521 /* XXX: compare the time. jabber:x:delay can happen on presence packets that aren't really and truly delayed */ |