Mercurial > pidgin
comparison libpurple/protocols/jabber/caps.c @ 19698:d32ed28cf645
Fix mingw build of xmpp prpl
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Mon, 10 Sep 2007 14:37:40 +0000 |
parents | ce04ca030a1b |
children | 5c419cd2cd22 |
comparison
equal
deleted
inserted
replaced
19697:481749fc0b6b | 19698:d32ed28cf645 |
---|---|
16 * You should have received a copy of the GNU General Public License | 16 * You should have received a copy of the GNU General Public License |
17 * along with this program; if not, write to the Free Software | 17 * along with this program; if not, write to the Free Software |
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
19 * | 19 * |
20 */ | 20 */ |
21 | |
22 #include "internal.h" | |
21 | 23 |
22 #include "caps.h" | 24 #include "caps.h" |
23 #include <string.h> | 25 #include <string.h> |
24 #include "internal.h" | 26 #include "internal.h" |
25 #include "util.h" | 27 #include "util.h" |
462 | 464 |
463 void jabber_caps_get_info(JabberStream *js, const char *who, const char *node, const char *ver, const char *ext, jabber_caps_get_info_cb cb, gpointer user_data) { | 465 void jabber_caps_get_info(JabberStream *js, const char *who, const char *node, const char *ver, const char *ext, jabber_caps_get_info_cb cb, gpointer user_data) { |
464 JabberCapsValue *client; | 466 JabberCapsValue *client; |
465 JabberCapsKey *key = g_new0(JabberCapsKey, 1); | 467 JabberCapsKey *key = g_new0(JabberCapsKey, 1); |
466 char *originalext = g_strdup(ext); | 468 char *originalext = g_strdup(ext); |
467 char *oneext, *ctx; | |
468 jabber_caps_cbplususerdata *userdata = g_new0(jabber_caps_cbplususerdata, 1); | 469 jabber_caps_cbplususerdata *userdata = g_new0(jabber_caps_cbplususerdata, 1); |
469 userdata->cb = cb; | 470 userdata->cb = cb; |
470 userdata->user_data = user_data; | 471 userdata->user_data = user_data; |
471 userdata->who = g_strdup(who); | 472 userdata->who = g_strdup(who); |
472 userdata->node = g_strdup(node); | 473 userdata->node = g_strdup(node); |
473 userdata->ver = g_strdup(ver); | 474 userdata->ver = g_strdup(ver); |
474 | 475 |
475 if(originalext) | 476 if(originalext) { |
476 for(oneext = strtok_r(originalext, " ", &ctx); oneext; oneext = strtok_r(NULL, " ", &ctx)) { | 477 gchar **tmp; |
477 userdata->ext = g_list_append(userdata->ext,g_strdup(oneext)); | 478 gchar **splat = g_strsplit(originalext, " ", 0); |
479 for(tmp = splat; *tmp; tmp++) { | |
480 userdata->ext = g_list_append(userdata->ext, tmp); | |
478 ++userdata->extOutstanding; | 481 ++userdata->extOutstanding; |
479 } | 482 } |
483 g_free(splat); | |
484 } | |
480 g_free(originalext); | 485 g_free(originalext); |
481 | 486 |
482 key->node = g_strdup(node); | 487 key->node = g_strdup(node); |
483 key->ver = g_strdup(ver); | 488 key->ver = g_strdup(ver); |
484 | 489 |