libpurple/protocols/myspace/myspace.c

branch
cpw.resiak.disconnectreason
changeset 21160
821c74a55abc
parent 21152
2357a7a795eb
parent 20942
5ea16ef55b3d
child 21279
40685e1f50ca
equal deleted inserted replaced
21159:1789766faa71 21160:821c74a55abc
2039 */ 2039 */
2040 static MsimMessage * 2040 static MsimMessage *
2041 msim_do_postprocessing(MsimMessage *msg, const gchar *uid_before, 2041 msim_do_postprocessing(MsimMessage *msg, const gchar *uid_before,
2042 const gchar *uid_field_name, guint uid) 2042 const gchar *uid_field_name, guint uid)
2043 { 2043 {
2044 MsimMessageElement *elem;
2044 msim_msg_dump("msim_do_postprocessing msg: %s\n", msg); 2045 msim_msg_dump("msim_do_postprocessing msg: %s\n", msg);
2045 2046
2046 /* First, check - if the field already exists, replace <uid> within it */ 2047 /* First, check - if the field already exists, replace <uid> within it */
2047 if (msim_msg_get(msg, uid_field_name)) { 2048 if ((elem = msim_msg_get(msg, uid_field_name)) != NULL) {
2048 MsimMessageElement *elem;
2049 gchar *fmt_string; 2049 gchar *fmt_string;
2050 gchar *uid_str, *new_str; 2050 gchar *uid_str, *new_str;
2051
2052 /* Warning: this is a delicate, but safe, operation */
2053
2054 elem = msim_msg_get(msg, uid_field_name);
2055 2051
2056 /* Get the packed element, flattening it. This allows <uid> to be 2052 /* Get the packed element, flattening it. This allows <uid> to be
2057 * replaced within nested data structures, since the replacement is done 2053 * replaced within nested data structures, since the replacement is done
2058 * on the linear, packed data, not on a complicated data structure. 2054 * on the linear, packed data, not on a complicated data structure.
2059 * 2055 *

mercurial