comparison src/protocols/jabber/jabber.c @ 5954:fccc33d4b8fa

[gaim-migrate @ 6398] I made serv_set_info or whatever it's called take a const char * I don't really remember why I also made some other small changes There should be no functionality change I'm still struggling to get available messages working. They haunt my dreams. Like the gray gorilla, or the Silhouette of the past, fading into the dim light of the moon. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Wed, 25 Jun 2003 04:20:30 +0000
parents 94ad4d45346a
children c5c3ddac1c89
comparison
equal deleted inserted replaced
5953:bc71bd31c223 5954:fccc33d4b8fa
3913 } 3913 }
3914 3914
3915 /* 3915 /*
3916 * Send vCard info to Jabber server 3916 * Send vCard info to Jabber server
3917 */ 3917 */
3918 static void jabber_set_info(GaimConnection *gc, char *info) 3918 static void jabber_set_info(GaimConnection *gc, const char *info)
3919 { 3919 {
3920 xmlnode x, vc_node; 3920 xmlnode x, vc_node;
3921 char *id; 3921 char *id;
3922 struct jabber_data *jd = gc->proto_data; 3922 struct jabber_data *jd = gc->proto_data;
3923 gjconn gjc = jd->gjc; 3923 gjconn gjc = jd->gjc;
3924 gchar *info2;
3924 3925
3925 x = xmlnode_new_tag("iq"); 3926 x = xmlnode_new_tag("iq");
3926 xmlnode_put_attrib(x, "type", "set"); 3927 xmlnode_put_attrib(x, "type", "set");
3927 3928
3928 id = gjab_getid(gjc); 3929 id = gjab_getid(gjc);
3930 xmlnode_put_attrib(x, "id", id); 3931 xmlnode_put_attrib(x, "id", id);
3931 3932
3932 /* 3933 /*
3933 * Send only if there's actually any *information* to send 3934 * Send only if there's actually any *information* to send
3934 */ 3935 */
3935 vc_node = xmlstr2xmlnode(info); 3936 info2 = g_strdup(info);
3937 vc_node = xmlstr2xmlnode(info2);
3936 3938
3937 if(vc_node) { 3939 if(vc_node) {
3938 if (xmlnode_get_name(vc_node) && 3940 if (xmlnode_get_name(vc_node) &&
3939 !g_ascii_strncasecmp(xmlnode_get_name(vc_node), "vcard", 5)) { 3941 !g_ascii_strncasecmp(xmlnode_get_name(vc_node), "vcard", 5)) {
3940 xmlnode_insert_tag_node(x, vc_node); 3942 xmlnode_insert_tag_node(x, vc_node);
3944 } 3946 }
3945 xmlnode_free(vc_node); 3947 xmlnode_free(vc_node);
3946 } 3948 }
3947 3949
3948 xmlnode_free(x); 3950 xmlnode_free(x);
3951 g_free(info2);
3949 } 3952 }
3950 3953
3951 /* 3954 /*
3952 * This is the callback from the "ok clicked" for "set vCard" 3955 * This is the callback from the "ok clicked" for "set vCard"
3953 * 3956 *