From: Nathan W. <fac...@us...> - 2003-10-14 05:07:44
|
Update of /cvsroot/gaim/gaim/src/protocols/zephyr In directory sc8-pr-cvs1:/tmp/cvs-serv21452/src/protocols/zephyr Modified Files: ZAsyncLocate.c zephyr.c zephyr.h Log Message: prpl-specific normalize is back, after my crusade to kill it. Index: ZAsyncLocate.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/zephyr/ZAsyncLocate.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- ZAsyncLocate.c 31 Jul 2001 01:00:39 -0000 1.1 +++ ZAsyncLocate.c 14 Oct 2003 05:07:39 -0000 1.2 @@ -19,7 +19,7 @@ static const char rcsid_ZAsyncLocate_c[] #endif Code_t ZRequestLocations(user, zald, kind, auth) - char *user; + const char *user; register ZAsyncLocateData_t *zald; ZNotice_Kind_t kind; /* UNSAFE, UNACKED, or ACKED */ Z_AuthProc auth; Index: zephyr.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/zephyr/zephyr.c,v retrieving revision 1.64 retrieving revision 1.65 diff -u -d -p -r1.64 -r1.65 --- zephyr.c 2 Oct 2003 13:06:42 -0000 1.64 +++ zephyr.c 14 Oct 2003 05:07:39 -0000 1.65 @@ -71,7 +71,7 @@ struct _zephyr_triple { return;\ } -static char *zephyr_normalize(const char *); +static const char *zephyr_normalize(const GaimAccount *, const char *); /* this is so bad, and if Zephyr weren't so fucked up to begin with I * wouldn't do this. but it is so i will. */ @@ -307,7 +307,7 @@ static gboolean pending_zloc(char *who) { GList *curr; for (curr = pending_zloc_names; curr != NULL; curr = curr->next) { - if (!g_ascii_strcasecmp(zephyr_normalize(who), (char*)curr->data)) { + if (!g_ascii_strcasecmp(zephyr_normalize(NULL, who), (char*)curr->data)) { g_free((char*)curr->data); pending_zloc_names = g_list_remove(pending_zloc_names, curr->data); return TRUE; @@ -465,8 +465,8 @@ static gint check_loc(gpointer data) if(!GAIM_BLIST_NODE_IS_BUDDY(bnode)) continue; if(b->account->gc == zgc) { - char *chk; - chk = zephyr_normalize(b->name); + const char *chk; + chk = zephyr_normalize(b->account, b->name); /* doesn't matter if this fails or not; we'll just move on to the next one */ ZRequestLocations(chk, &ald, UNACKED, ZAUTH); free(ald.user); @@ -783,9 +783,9 @@ static int zephyr_chat_send(GaimConnecti notice.z_class = zt->class; notice.z_class_inst = zt->instance; if (!g_ascii_strcasecmp(zt->recipient, "*")) - notice.z_recipient = zephyr_normalize(""); + notice.z_recipient = zephyr_normalize(NULL, ""); else - notice.z_recipient = zephyr_normalize(zt->recipient); + notice.z_recipient = zephyr_normalize(NULL, zt->recipient); notice.z_sender = 0; notice.z_default_format = "Class $class, Instance $instance:\n" @@ -832,7 +832,7 @@ static int zephyr_send_im(GaimConnection return 1; } -static char *zephyr_normalize(const char *orig) +static const char *zephyr_normalize(const GaimAccount *account, const char *orig) { static char buf[80]; if (!g_ascii_strcasecmp(orig, "")) { @@ -850,13 +850,13 @@ static char *zephyr_normalize(const char static void zephyr_zloc(GaimConnection *gc, const char *who) { ZAsyncLocateData_t ald; - - if (ZRequestLocations(zephyr_normalize(who), &ald, UNACKED, ZAUTH) + + if (ZRequestLocations(zephyr_normalize(gc->account, who), &ald, UNACKED, ZAUTH) != ZERR_NONE) { return; } pending_zloc_names = g_list_append(pending_zloc_names, - g_strdup(zephyr_normalize(who))); + g_strdup(zephyr_normalize(gc->account, who))); } static GList *zephyr_buddy_menu(GaimConnection *gc, const char *who) Index: zephyr.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/zephyr/zephyr.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -p -r1.3 -r1.4 --- zephyr.h 15 Apr 2003 04:18:00 -0000 1.3 +++ zephyr.h 14 Oct 2003 05:07:39 -0000 1.4 @@ -89,7 +89,7 @@ typedef struct _ZNotice_t { int z_authent_len; char *z_ascii_authent; char *z_class; - char *z_class_inst; + const char *z_class_inst; char *z_opcode; char *z_sender; const char *z_recipient; @@ -161,7 +161,7 @@ Code_t ZFormatSmallNotice ZP((ZNotice_t* Code_t ZFormatRawNoticeList ZP((ZNotice_t *notice, char *list[], int nitems, char **buffer, int *ret_len)); Code_t ZLocateUser ZP((char *, int *, Z_AuthProc)); -Code_t ZRequestLocations ZP((char *, ZAsyncLocateData_t *, +Code_t ZRequestLocations ZP((const char *, ZAsyncLocateData_t *, ZNotice_Kind_t, Z_AuthProc)); Code_t ZhmStat ZP((struct in_addr *, ZNotice_t *)); Code_t ZInitialize ZP((void)); |