soc.2010.icq-tlc: 1c3610b4: Moved an error handler from oscar.c to f...
ivan.komarov at soc.pidgin.im
ivan.komarov at soc.pidgin.im
Sun May 30 15:25:42 EDT 2010
-----------------------------------------------------------------
Revision: 1c3610b4b4451524ad3b5efd5ff626c21c29e0b2
Ancestor: f765bcbdce8ccdb1171321a31fb598f93841133f
Author: ivan.komarov at soc.pidgin.im
Date: 2010-05-30T19:08:35
Branch: im.pidgin.soc.2010.icq-tlc
URL: http://d.pidgin.im/viewmtn/revision/info/1c3610b4b4451524ad3b5efd5ff626c21c29e0b2
Modified files:
libpurple/protocols/oscar/family_locate.c
libpurple/protocols/oscar/oscar.c
ChangeLog:
Moved an error handler from oscar.c to family_locate.c.
-------------- next part --------------
============================================================
--- libpurple/protocols/oscar/family_locate.c a9fb8fd0ac41005d65f7aee6c323c80db13ee0c9
+++ libpurple/protocols/oscar/family_locate.c 9f162d42e704a2630980cc3e684f5099938136cd
@@ -1225,8 +1225,6 @@ error(OscarData *od, FlapConnection *con
static int
error(OscarData *od, FlapConnection *conn, aim_module_t *mod, FlapFrame *frame, aim_modsnac_t *snac, ByteStream *bs)
{
- int ret = 0;
- aim_rxcallback_t userfunc;
aim_snac_t *snac2;
guint16 reason;
char *bn;
@@ -1253,14 +1251,12 @@ error(OscarData *od, FlapConnection *con
reason = byte_stream_get16(bs);
- /* Notify the user that we do not have info for this buddy */
- if ((userfunc = aim_callhandler(od, snac->family, snac->subtype)))
- ret = userfunc(od, conn, frame, reason, bn);
+ oscar_user_info_display_error(od, reason, bn);
g_free(snac2->data);
g_free(snac2);
- return ret;
+ return 1;
}
/*
============================================================
--- libpurple/protocols/oscar/oscar.c c5a53006345958aeb900a44afc9330486bf54f04
+++ libpurple/protocols/oscar/oscar.c 06e0fbe3baaf3acf0832ec2cb6b44e788f9cd198
@@ -115,7 +115,6 @@ static int purple_parse_buddyrights(Osca
static int purple_parse_mtn (OscarData *, FlapConnection *, FlapFrame *, ...);
static int purple_parse_locaterights(OscarData *, FlapConnection *, FlapFrame *, ...);
static int purple_parse_buddyrights(OscarData *, FlapConnection *, FlapFrame *, ...);
-static int purple_parse_locerr (OscarData *, FlapConnection *, FlapFrame *, ...);
static int purple_parse_genericerr (OscarData *, FlapConnection *, FlapFrame *, ...);
static int purple_memrequest (OscarData *, FlapConnection *, FlapFrame *, ...);
static int purple_selfinfo (OscarData *, FlapConnection *, FlapFrame *, ...);
@@ -1029,7 +1028,6 @@ oscar_login(PurpleAccount *account)
oscar_data_addhandler(od, SNAC_FAMILY_ICBM, SNAC_SUBTYPE_ICBM_MTN, purple_parse_mtn, 0);
oscar_data_addhandler(od, SNAC_FAMILY_ICBM, SNAC_SUBTYPE_ICBM_ACK, purple_parse_msgack, 0);
oscar_data_addhandler(od, SNAC_FAMILY_LOCATE, SNAC_SUBTYPE_LOCATE_RIGHTSINFO, purple_parse_locaterights, 0);
- oscar_data_addhandler(od, SNAC_FAMILY_LOCATE, SNAC_SUBTYPE_LOCATE_ERROR, purple_parse_locerr, 0);
oscar_data_addhandler(od, SNAC_FAMILY_OSERVICE, 0x0001, purple_parse_genericerr, 0);
oscar_data_addhandler(od, SNAC_FAMILY_OSERVICE, 0x000f, purple_selfinfo, 0);
oscar_data_addhandler(od, SNAC_FAMILY_OSERVICE, 0x001f, purple_memrequest, 0);
@@ -2765,27 +2763,6 @@ static int purple_parse_mtn(OscarData *o
return 1;
}
-/*
- * We get this error when there was an error in the locate family. This
- * happens when you request info of someone who is offline.
- */
-static int purple_parse_locerr(OscarData *od, FlapConnection *conn, FlapFrame *fr, ...) {
- va_list ap;
- guint16 reason;
- char *destn;
-
- va_start(ap, fr);
- reason = (guint16) va_arg(ap, unsigned int);
- destn = va_arg(ap, char *);
- va_end(ap);
-
- if (destn == NULL)
- return 1;
-
- oscar_user_info_display_error(od, reason, destn);
- return 1;
-}
-
static int purple_parse_motd(OscarData *od, FlapConnection *conn, FlapFrame *fr, ...)
{
char *msg;
More information about the Commits
mailing list