Mercurial > pidgin.yaz
comparison libpurple/protocols/bonjour/parser.c @ 25871:f424f26dd329
*** Plucked rev d34a1589 (darkrain42@pidgin.im):
Feed a fake </stream:stream> to the XMPP parser to silence warnings.
Upgrading to TLS and disconnecting should no longer emit
'Extra content at the end of the document'
References #8830.
*** Plucked rev ca9f6d5b (darkrain42@pidgin.im):
Add xmlnode and bonjour structured error handlers.
Various libraries may set global structured error handlers and libxml2
prefers those to a per-context normal error handler. This causes us to
break badly.
References #8830.
*** Plucked rev 34f4897e (darkrain42@pidgin.im):
xmlCtxtGetLastError may return NULL, especially with other misbehaving
libraries in our address space.
References #8136.
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Wed, 29 Apr 2009 20:57:53 +0000 |
parents | 1c87e81c44fa |
children | 01f1929d0936 |
comparison
equal
deleted
inserted
replaced
25870:3ebd399dd81e | 25871:f424f26dd329 |
---|---|
152 | 152 |
153 if(!text || !text_len) | 153 if(!text || !text_len) |
154 return; | 154 return; |
155 | 155 |
156 xmlnode_insert_data(bconv->current, (const char*) text, text_len); | 156 xmlnode_insert_data(bconv->current, (const char*) text, text_len); |
157 } | |
158 | |
159 static void | |
160 bonjour_parser_structured_error_handler(void *user_data, xmlErrorPtr error) | |
161 { | |
162 BonjourJabberConversation *bconv = user_data; | |
163 | |
164 purple_debug_error("jabber", "XML parser error for BonjourJabberConversation %p: " | |
165 "Domain %i, code %i, level %i: %s", | |
166 bconv, | |
167 error->domain, error->code, error->level, | |
168 (error->message ? error->message : "(null)\n")); | |
157 } | 169 } |
158 | 170 |
159 static xmlSAXHandler bonjour_parser_libxml = { | 171 static xmlSAXHandler bonjour_parser_libxml = { |
160 NULL, /*internalSubset*/ | 172 NULL, /*internalSubset*/ |
161 NULL, /*isStandalone*/ | 173 NULL, /*isStandalone*/ |
186 NULL, /*externalSubset*/ | 198 NULL, /*externalSubset*/ |
187 XML_SAX2_MAGIC, /*initialized*/ | 199 XML_SAX2_MAGIC, /*initialized*/ |
188 NULL, /*_private*/ | 200 NULL, /*_private*/ |
189 bonjour_parser_element_start_libxml, /*startElementNs*/ | 201 bonjour_parser_element_start_libxml, /*startElementNs*/ |
190 bonjour_parser_element_end_libxml, /*endElementNs*/ | 202 bonjour_parser_element_end_libxml, /*endElementNs*/ |
191 NULL /*serror*/ | 203 bonjour_parser_structured_error_handler /*serror*/ |
192 }; | 204 }; |
193 | 205 |
194 void | 206 void |
195 bonjour_parser_setup(BonjourJabberConversation *bconv) | 207 bonjour_parser_setup(BonjourJabberConversation *bconv) |
196 { | 208 { |