changeset 9647:687572cf09a6

[gaim-migrate @ 10495] (13:40:54) datallah: LSchiere2: http://www.butfer.com/gaim-patches/1001419_bugfix.patch should fix (13:40:54) datallah: 1001419 (the server.c change is optional at this point, but i think that the check should be done there) committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Mon, 02 Aug 2004 17:50:53 +0000
parents 535343d6ca13
children 2316cb7a115f
files src/protocols/oscar/oscar.c src/server.c
diffstat 2 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/oscar/oscar.c	Mon Aug 02 15:37:09 2004 +0000
+++ b/src/protocols/oscar/oscar.c	Mon Aug 02 17:50:53 2004 +0000
@@ -3903,7 +3903,7 @@
 	/* Data is assumed to be the destination sn */
 	if (!gaim_conv_present_error(data, gaim_connection_get_account(gc), 
 				     (reason < msgerrreasonlen) ? _(msgerrreason[reason]) : _("Your message did not get sent."))) {
-		buf = g_strdup_printf(_("Your message to %s did not get sent:"), data);
+		buf = g_strdup_printf(_("Your message to %s did not get sent:"), data ? data : "(null)");
 		gaim_notify_error(sess->aux_data, NULL, buf,
 				  (reason < msgerrreasonlen) ? _(msgerrreason[reason]) : _("No reason given."));
 		g_free(buf);
--- a/src/server.c	Mon Aug 02 15:37:09 2004 +0000
+++ b/src/server.c	Mon Aug 02 17:50:53 2004 +0000
@@ -1605,6 +1605,9 @@
 	if (gc != NULL && gc->prpl != NULL)
 		prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl);
 
-	if (prpl_info && prpl_info->send_file)
-		prpl_info->send_file(gc, who, file);
+	if (prpl_info && prpl_info->send_file) {
+		if (!prpl_info->can_receive_file || prpl_info->can_receive_file(gc, who)) {
+			prpl_info->send_file(gc, who, file);
+		}
+	}
 }