changeset 4358:2b8abf7f9cc1

[gaim-migrate @ 4624] Aubin has the eyes of an Eagle, and the talons of the restaurant place that Lana Lang runs on Smallville. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Mon, 20 Jan 2003 07:00:10 +0000
parents 367fc70fe4f7
children 5fb47ec9bfe4
files src/protocols/oscar/oscar.c src/protocols/oscar/ssi.c
diffstat 2 files changed, 11 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/oscar/oscar.c	Mon Jan 20 06:28:08 2003 +0000
+++ b/src/protocols/oscar/oscar.c	Mon Jan 20 07:00:10 2003 +0000
@@ -1941,6 +1941,7 @@
 	} else if (args->reqclass & AIM_CAPS_SENDFILE) {
 		struct oscar_file_transfer *oft;
 		struct oscar_data *od = gc->proto_data;
+		char *tmp;
 
 		if (!args->cookie || !args->verifiedip || !args->port ||
 		    !args->info.sendfile.filename || !args->info.sendfile.totsize ||
@@ -2013,11 +2014,12 @@
 
 		od->file_transfers = g_slist_append(od->file_transfers, oft);
 
-		if (*(strrchr(args->info.sendfile.filename, '\\') + 1) == '*' ) {
-			/* last char of the ft req is a star, they are sending us a
-			 * directory -- remove the star and trailing slash so we dont save
-			 * directories that look like 'dirname\*'  -- arl */
-			*strrchr(args->info.sendfile.filename, '\\') = '\0';
+		/* last char of the ft req is a star, they are sending us a
+		 * directory -- remove the star and trailing slash so we dont save
+		 * directories that look like 'dirname\*'  -- arl */
+		tmp = strrchr(args->info.sendfile.filename, '\\');
+		if (tmp && (tmp[1] == '*')) {
+			tmp[0] = '\0';
 		}
 
 		oft->xfer = transfer_in_add(gc, userinfo->sn, 
--- a/src/protocols/oscar/ssi.c	Mon Jan 20 06:28:08 2003 +0000
+++ b/src/protocols/oscar/ssi.c	Mon Jan 20 07:00:10 2003 +0000
@@ -1376,10 +1376,10 @@
 		aimbs_get16(bs);
 		aim_bstream_advance(bs, aimbs_get16(bs));
 
-		del = aim_ssi_itemlist_find(sess->ssi.local, gid, bid);
-		aim_ssi_itemlist_del(&sess->ssi.local, del);
-		del = aim_ssi_itemlist_find(sess->ssi.official, gid, bid);
-		aim_ssi_itemlist_del(&sess->ssi.official, del);
+		if ((del = aim_ssi_itemlist_find(sess->ssi.local, gid, bid)))
+			aim_ssi_itemlist_del(&sess->ssi.local, del);
+		if ((del = aim_ssi_itemlist_find(sess->ssi.official, gid, bid)))
+			aim_ssi_itemlist_del(&sess->ssi.official, del);
 
 		if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype)))
 			ret = userfunc(sess, rx);