Mercurial > pidgin.yaz
changeset 18120:cd385a6206e2
merge of '55af2e26c71950d7f8fc3a7b6a9b2249abb5ae0f'
and '66fcc437e88dec3495cdf6365679df6c856484cd'
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Sat, 16 Jun 2007 19:49:59 +0000 |
parents | f52def9dc7c9 (diff) 59aec2d6ec43 (current diff) |
children | 9b9e202eb449 |
files | |
diffstat | 4 files changed, 23 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/finch/libgnt/wms/irssi.c Sat Jun 16 19:48:23 2007 +0000 +++ b/finch/libgnt/wms/irssi.c Sat Jun 16 19:49:59 2007 +0000 @@ -177,7 +177,8 @@ { char title[256]; snprintf(title, sizeof(title), "%d: %s", - (int)g_object_get_data(G_OBJECT(node->me), "irssi-index") + 1, GNT_BOX(node->me)->title); + GPOINTER_TO_INT(g_object_get_data(G_OBJECT(node->me), "irssi-index")) + 1, + GNT_BOX(node->me)->title); wbkgdset(node->window, '\0' | COLOR_PAIR(gnt_widget_has_focus(node->me) ? GNT_COLOR_TITLE : GNT_COLOR_TITLE_D)); mvwaddstr(node->window, 0, 0, title); update_panels(); @@ -226,7 +227,7 @@ find_window_position(irssi, win, &hor, &vert); - switch ((int)list->data) { + switch (GPOINTER_TO_INT(list->data)) { case 'k': vert = MAX(0, vert - 1); break;
--- a/libpurple/protocols/jabber/disco.c Sat Jun 16 19:48:23 2007 +0000 +++ b/libpurple/protocols/jabber/disco.c Sat Jun 16 19:49:59 2007 +0000 @@ -96,6 +96,7 @@ SUPPORT_FEATURE("http://jabber.org/protocol/si") SUPPORT_FEATURE("http://jabber.org/protocol/si/profile/file-transfer") SUPPORT_FEATURE("http://jabber.org/protocol/xhtml-im") + SUPPORT_FEATURE("urn:xmpp:ping") } else { xmlnode *error, *inf;
--- a/libpurple/protocols/jabber/iq.c Sat Jun 16 19:48:23 2007 +0000 +++ b/libpurple/protocols/jabber/iq.c Sat Jun 16 19:49:59 2007 +0000 @@ -201,6 +201,24 @@ xmlnode_insert_data(xmlnode_new_child(query, "display"), date, -1); jabber_iq_send(iq); + } else { + /* XXX: error */ + } +} + +static void urn_xmpp_ping_parse(JabberStream *js, xmlnode *packet) +{ + const char *type, *id; + JabberIq *iq; + + if(type && !strcmp(type, "get")) { + iq = jabber_iq_new_query(js, JABBER_IQ_RESULT, "urn:xmpp:ping"); + + jabber_iq_set_id(iq, id); + + jabber_iq_send(iq); + } else { + /* XXX: error */ } } @@ -328,6 +346,7 @@ jabber_iq_register_handler("http://jabber.org/protocol/disco#info", jabber_disco_info_parse); jabber_iq_register_handler("http://jabber.org/protocol/disco#items", jabber_disco_items_parse); jabber_iq_register_handler("jabber:iq:register", jabber_register_parse); + jabber_iq_register_handler("urn:xmpp:ping", urn_xmpp_ping_parse); } void jabber_iq_uninit(void)