From: Christian H. <ch...@us...> - 2002-12-21 19:33:57
|
Update of /cvsroot/gaim/gaim/src/protocols/yahoo In directory sc8-pr-cvs1:/tmp/cvs-serv4304/src/protocols/yahoo Modified Files: yahoo.c Log Message: <Robot101> adds a gc->flag called OPT_CONN_AUTO_RESP so that gc->away can always store the away message even if the prpl doesn't support autoresponding <Robot101> makes all protos correctly free and set gc->away to avoid leaks <Robot101> stores the current away state in gc->away_state whenever gc->away is non-NULL (ie it's not just a plain on-line) <Robot101> also minor change to Jabber to make Chatty an away state, and to Gadu-Gadu to make some other thing an away state too Index: yahoo.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/yahoo/yahoo.c,v retrieving revision 1.60 retrieving revision 1.61 diff -u -d -r1.60 -r1.61 --- yahoo.c 4 Dec 2002 05:12:06 -0000 1.60 +++ yahoo.c 21 Dec 2002 19:33:54 -0000 1.61 @@ -1186,15 +1186,19 @@ int service; char s[4]; - gc->away = NULL; + if (gc->away) { + g_free(gc->away); + gc->away = NULL; + } if (msg) { yd->current_status = YAHOO_STATUS_CUSTOM; - gc->away = ""; + gc->away = g_strdup(msg); } else if (state) { - gc->away = ""; + gc->away = g_strdup(""); if (!strcmp(state, "Available")) { yd->current_status = YAHOO_STATUS_AVAILABLE; + g_free(gc->away); gc->away = NULL; } else if (!strcmp(state, "Be Right Back")) { yd->current_status = YAHOO_STATUS_BRB; @@ -1222,6 +1226,7 @@ } else { yd->current_status = YAHOO_STATUS_AVAILABLE; } + g_free(gc->away); gc->away = NULL; } } else if (gc->is_idle) { |