~vish/ubuntu/maverick/pidgin/bug25979

« back to all changes in this revision

Viewing changes to libpurple/protocols/jabber/parser.c

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2009-10-09 19:40:26 UTC
  • mfrom: (1.4.1 upstream) (46.1.10 karmic)
  • Revision ID: james.westby@ubuntu.com-20091009194026-wbqqh0bsbz19nx5q
Tags: 1:2.6.2-1ubuntu7
* Don't stick the buddy list window to all desktops as some
  window managers have trouble to properly unstick it (LP: #346840)
  - debian/patches/11_buddy_list_really_show.patch
* Always use default tray icon size on KDE (LP: #209440)
  - debian/patches/62_tray_icon_size_kde.patch
* Use scrollbars in the preferences dialog if the screen height is
  below 700 px instead of 600 px
  - debian/patches/60_1024x600_gtkprefs.c.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 * purple - Jabber XML parser stuff
3
3
 *
4
 
 * Copyright (C) 2003, Nathan Walp <faceprint@faceprint.com>
 
4
 * Purple is the legal property of its developers, whose names are too numerous
 
5
 * to list here.  Please refer to the COPYRIGHT file distributed with this
 
6
 * source distribution.
5
7
 *
6
8
 * This program is free software; you can redistribute it and/or modify
7
9
 * it under the terms of the GNU General Public License as published by
86
88
                        }
87
89
                }
88
90
                for(i=0; i < nb_attributes * 5; i+=5) {
 
91
                        const char *name = (const char *)attributes[i];
 
92
                        const char *prefix = (const char *)attributes[i+1];
89
93
                        const char *attrib_ns = (const char *)attributes[i+2];
90
94
                        char *txt;
91
95
                        int attrib_len = attributes[i+4] - attributes[i+3];
97
101
                        txt = attrib;
98
102
                        attrib = purple_unescape_html(txt);
99
103
                        g_free(txt);
100
 
                        xmlnode_set_attrib_with_namespace(node, (const char*) attributes[i], attrib_ns, attrib);
 
104
                        xmlnode_set_attrib_full(node, name, attrib_ns, prefix, attrib);
101
105
                        g_free(attrib);
102
106
                }
103
107
 
205
209
        jabber_parser_free(js);
206
210
}
207
211
 
208
 
void
209
 
jabber_parser_close_stream(JabberStream *js)
210
 
{
211
 
        xmlParseChunk(js->context, "</stream:stream>", 16 /* length */, 0);
212
 
}
213
 
 
214
212
void jabber_parser_free(JabberStream *js) {
215
213
        if (js->context) {
216
214
                xmlParseChunk(js->context, NULL,0,1);