changeset 7301:0ed0ac132b1b

[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 <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sun, 19 Oct 2003 05:54:41 +0000
parents 41bbe5534441
children 33bbe8e9714f
files src/protocols/oscar/icq.c src/protocols/oscar/locate.c src/protocols/oscar/oscar.c
diffstat 3 files changed, 6 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- 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;
--- 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);
--- 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;
 }