# HG changeset patch # User Mark Doliner # Date 1066542881 0 # Node ID 0ed0ac132b1b0c6b9b84e7498551df7e486dcc62 # Parent 41bbe5534441eb8565ab50f508baad7baf42baf8 [gaim-migrate @ 7885] 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. committer: Tailor Script diff -r 41bbe5534441 -r 0ed0ac132b1b src/protocols/oscar/icq.c --- a/src/protocols/oscar/icq.c Sun Oct 19 02:01:06 2003 +0000 +++ b/src/protocols/oscar/icq.c Sun Oct 19 05:54:41 2003 +0000 @@ -359,7 +359,7 @@ 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; diff -r 41bbe5534441 -r 0ed0ac132b1b src/protocols/oscar/locate.c --- a/src/protocols/oscar/locate.c Sun Oct 19 02:01:06 2003 +0000 +++ b/src/protocols/oscar/locate.c Sun Oct 19 05:54:41 2003 +0000 @@ -217,7 +217,7 @@ 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 @@ 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); diff -r 41bbe5534441 -r 0ed0ac132b1b src/protocols/oscar/oscar.c --- a/src/protocols/oscar/oscar.c Sun Oct 19 02:01:06 2003 +0000 +++ b/src/protocols/oscar/oscar.c Sun Oct 19 05:54:41 2003 +0000 @@ -3399,8 +3399,8 @@ 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 @@ 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; }