Mercurial > pidgin
comparison libpurple/protocols/jabber/presence.c @ 25199:fcd9b7c5ce05
Oops, unleak...
author | Marcus Lundblad <ml@update.uu.se> |
---|---|
date | Sun, 16 Nov 2008 22:45:11 +0000 |
parents | e9b7e41dc816 |
children | bb996cc49073 |
comparison
equal
deleted
inserted
replaced
25198:e9b7e41dc816 | 25199:fcd9b7c5ce05 |
---|---|
262 } | 262 } |
263 | 263 |
264 /* if we are idle and not offline, include idle */ | 264 /* if we are idle and not offline, include idle */ |
265 if (js->idle && state != JABBER_BUDDY_STATE_UNAVAILABLE) { | 265 if (js->idle && state != JABBER_BUDDY_STATE_UNAVAILABLE) { |
266 xmlnode *query = xmlnode_new_child(presence, "query"); | 266 xmlnode *query = xmlnode_new_child(presence, "query"); |
267 gchar *seconds = g_strdup_printf("%d", (int) (time(NULL) - js->idle)); | 267 gchar seconds[10]; |
268 g_sprintf(seconds, "%d", (int) (time(NULL) - js->idle)); | |
268 | 269 |
269 xmlnode_set_namespace(query, "jabber:iq:last"); | 270 xmlnode_set_namespace(query, "jabber:iq:last"); |
270 xmlnode_set_attrib(query, "seconds", seconds); | 271 xmlnode_set_attrib(query, "seconds", seconds); |
271 } | 272 } |
272 | 273 |