Mercurial > pidgin
comparison libpurple/protocols/jabber/xdata.c @ 16319:bfa7bc0e7b21
Ok I couldn't resist. For iChat and Adium buddies who are advertising
an iTunes Music Store link, we now linkify the available message in
the user info window.
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Mon, 23 Apr 2007 07:54:13 +0000 |
parents | 0db4eca4a3e0 |
children | 08db93bbd798 |
comparison
equal
deleted
inserted
replaced
16318:1560f28cb854 | 16319:bfa7bc0e7b21 |
---|---|
62 switch(type) { | 62 switch(type) { |
63 case JABBER_X_DATA_TEXT_SINGLE: | 63 case JABBER_X_DATA_TEXT_SINGLE: |
64 case JABBER_X_DATA_JID_SINGLE: | 64 case JABBER_X_DATA_JID_SINGLE: |
65 { | 65 { |
66 const char *value = purple_request_field_string_get_value(field); | 66 const char *value = purple_request_field_string_get_value(field); |
67 if (value == NULL) | |
68 break; | |
67 fieldnode = xmlnode_new_child(result, "field"); | 69 fieldnode = xmlnode_new_child(result, "field"); |
68 xmlnode_set_attrib(fieldnode, "var", id); | 70 xmlnode_set_attrib(fieldnode, "var", id); |
69 valuenode = xmlnode_new_child(fieldnode, "value"); | 71 valuenode = xmlnode_new_child(fieldnode, "value"); |
70 if(value) | 72 if(value) |
71 xmlnode_insert_data(valuenode, value, -1); | 73 xmlnode_insert_data(valuenode, value, -1); |
73 } | 75 } |
74 case JABBER_X_DATA_TEXT_MULTI: | 76 case JABBER_X_DATA_TEXT_MULTI: |
75 { | 77 { |
76 char **pieces, **p; | 78 char **pieces, **p; |
77 const char *value = purple_request_field_string_get_value(field); | 79 const char *value = purple_request_field_string_get_value(field); |
80 if (value == NULL) | |
81 break; | |
78 fieldnode = xmlnode_new_child(result, "field"); | 82 fieldnode = xmlnode_new_child(result, "field"); |
79 xmlnode_set_attrib(fieldnode, "var", id); | 83 xmlnode_set_attrib(fieldnode, "var", id); |
80 | 84 |
81 pieces = g_strsplit(value, "\n", -1); | 85 pieces = g_strsplit(value, "\n", -1); |
82 for(p = pieces; *p != NULL; p++) { | 86 for(p = pieces; *p != NULL; p++) { |