Update of /cvsroot/gaim/gaim/src/protocols/oscar
In directory usw-pr-cvs1:/tmp/cvs-serv31917/src/protocols/oscar
Modified Files:
oscar.c
Log Message:
Fix crash for checking ICQ info of people not in your contact list.
(Thanks, Mark Doliner)
Index: oscar.c
===================================================================
RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/oscar.c,v
retrieving revision 1.138
retrieving revision 1.139
diff -u -d -r1.138 -r1.139
--- oscar.c 21 May 2002 21:26:53 -0000 1.138
+++ oscar.c 23 May 2002 00:06:01 -0000 1.139
@@ -2503,19 +2503,22 @@
* parse-icq-status-message function knows if it is putting it's message in
* an info window because the name will _not_ be in od->evilhack. For getting
* only the away message the contact's UIN is put in od->evilhack. */
- if ((budlight = find_buddy(gc, who)) && ((budlight->uc >> 7) & (AIM_ICQ_STATE_AWAY || AIM_ICQ_STATE_DND || AIM_ICQ_STATE_OUT || AIM_ICQ_STATE_BUSY || AIM_ICQ_STATE_CHAT))) {
- if (budlight->caps & AIM_CAPS_ICQSERVERRELAY)
- g_show_info_text(gc, who, 0, buf, NULL);
- else {
+ if (budlight = find_buddy(gc, who)) {
+ if ((budlight->uc >> 7) & (AIM_ICQ_STATE_AWAY || AIM_ICQ_STATE_DND || AIM_ICQ_STATE_OUT || AIM_ICQ_STATE_BUSY || AIM_ICQ_STATE_CHAT)) {
+ if (budlight->caps & AIM_CAPS_ICQSERVERRELAY)
+ g_show_info_text(gc, who, 0, buf, NULL);
+ else {
+ char *state_msg = gaim_icq_status((budlight->uc & 0xff80) >> 7);
+ g_show_info_text(gc, who, 2, buf, "<B>Status:</B> ", state_msg, "<BR>\n<HR><BR><I>Remote client does not support sending status messages.</I><BR>\n", NULL);
+ free(state_msg);
+ }
+ } else {
char *state_msg = gaim_icq_status((budlight->uc & 0xff80) >> 7);
- g_show_info_text(gc, who, 2, buf, "<B>Status:</B> ", state_msg, "<BR>\n<HR><BR><I>Remote client does not support sending status messages.</I><BR>\n", NULL);
+ g_show_info_text(gc, who, 2, buf, "<B>Status:</B> ", state_msg, NULL);
free(state_msg);
}
- } else {
- char *state_msg = gaim_icq_status((budlight->uc & 0xff80) >> 7);
- g_show_info_text(gc, who, 2, buf, "<B>Status:</B> ", state_msg, NULL);
- free(state_msg);
- }
+ } else
+ g_show_info_text(gc, who, 2, buf, NULL);
return 1;
}
|