From: Mark D. <the...@us...> - 2003-10-19 05:57:58
|
Update of /cvsroot/gaim/gaim/src/protocols/oscar In directory sc8-pr-cvs1:/tmp/cvs-serv15200/src/protocols/oscar Modified Files: oscar.c locate.c icq.c Log Message: Fix a little bug where if someone has info set, then they set their info to nothing, Gaim thinks the person still has the old info. Also fix a crash, I'm not really sure why it wasn't crashing Sean, but it makes more sense this way. Index: oscar.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/oscar.c,v retrieving revision 1.483 retrieving revision 1.484 diff -u -d -p -r1.483 -r1.484 --- oscar.c 18 Oct 2003 03:34:14 -0000 1.483 +++ oscar.c 19 Oct 2003 05:54:41 -0000 1.484 @@ -3399,8 +3399,8 @@ static int gaim_email_parseupdate(aim_se va_start(ap, fr); emailinfo = va_arg(ap, struct aim_emailinfo *); havenewmail = va_arg(ap, int); - alertitle = va_arg(ap, char*); - alerturl = va_arg(ap, char*); + alertitle = va_arg(ap, char *); + alerturl = va_arg(ap, char *); va_end(ap); if (emailinfo && gaim_account_get_check_mail(gc->account)) { @@ -3410,13 +3410,8 @@ static int gaim_email_parseupdate(aim_se g_free(to); } - if (alertitle) { + if (alertitle) gaim_debug(GAIM_DEBUG_MISC, "oscar", "Got an alert '%s' %s\n", alertitle, alerturl); - g_free(alertitle); - } - if (alerturl) - g_free(alerturl); - return 1; } Index: locate.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/locate.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -p -r1.13 -r1.14 --- locate.c 16 Oct 2003 06:12:43 -0000 1.13 +++ locate.c 19 Oct 2003 05:54:41 -0000 1.14 @@ -217,7 +217,7 @@ static void aim_locate_adduserinfo(aim_s cur->iconcsumlen = userinfo->iconcsumlen; } - if ((userinfo->info != NULL) && (userinfo->info_len > 0)) { + if (userinfo->info != NULL) { free(cur->info); free(cur->info_encoding); cur->info = (char *)malloc(userinfo->info_len); @@ -226,7 +226,7 @@ static void aim_locate_adduserinfo(aim_s cur->info_len = userinfo->info_len; } - if ((userinfo->away != NULL) && (userinfo->away_len > 0)) { + if (userinfo->away != NULL) { free(cur->away); free(cur->away_encoding); cur->away = (char *)malloc(userinfo->away_len); Index: icq.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/icq.c,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -p -r1.24 -r1.25 --- icq.c 16 Oct 2003 06:12:43 -0000 1.24 +++ icq.c 19 Oct 2003 05:54:41 -0000 1.25 @@ -359,7 +359,7 @@ faim_export int aim_icq_sendsms(aim_sess strftime(timestr, 30, "%a, %d %b %Y %T %Z", tm); /* The length of xml included the null terminating character */ - xmllen = 500 + strlen(name) + strlen(msg) + strlen(sess->sn) + strlen(alias) + strlen(timestr) + 1; + xmllen = 225 + strlen(name) + strlen(msg) + strlen(sess->sn) + strlen(alias) + strlen(timestr) + 1; if (!(xml = (char *)malloc(xmllen*sizeof(char)))) return -ENOMEM; |