rpms/gnome-vfs2-obexftp/F-7 gnome-vfs-obexftp-fix-crash-when-not-connected.patch, NONE, 1.1 gnome-vfs2-obexftp.spec, 1.1, 1.2

Bastien Nocera (hadess) fedora-extras-commits at redhat.com
Fri Jun 1 23:19:45 UTC 2007


Author: hadess

Update of /cvs/pkgs/rpms/gnome-vfs2-obexftp/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv10060

Modified Files:
	gnome-vfs2-obexftp.spec 
Added Files:
	gnome-vfs-obexftp-fix-crash-when-not-connected.patch 
Log Message:
* Sat Jun 02 2007 - Bastien Nocera <bnocera at redhat.com> - 0.2-7
- Fix crash when we can't connect through an rfcomm socket, reported
  by Olivier Fourdan


gnome-vfs-obexftp-fix-crash-when-not-connected.patch:

--- NEW FILE gnome-vfs-obexftp-fix-crash-when-not-connected.patch ---
diff -ur gnome-vfs-obexftp-0.2/src/om-dbus.c gnome-vfs-obexftp-0.2.new/src/om-dbus.c
--- gnome-vfs-obexftp-0.2/src/om-dbus.c	2007-06-02 00:06:12.000000000 +0100
+++ gnome-vfs-obexftp-0.2.new/src/om-dbus.c	2007-06-01 20:04:45.000000000 +0100
@@ -355,12 +355,14 @@
 	sdp = sdp_connect (&source_bdaddr, &dest_bdaddr, SDP_RETRY_IF_BUSY);
 	if (!sdp) {
 		d(g_printerr("get_dev: Can't open connection to SDP daemon"));
+		g_free (source_bdaddr_str);
 		*data->result = GNOME_VFS_ERROR_SERVICE_NOT_AVAILABLE;
 		return -1;
 	}
 	if (sdp_search_obexftp (sdp, &channel) < 0) {
 		d(g_printerr("get_dev: can't get channel for '%s' on '%s'",
 			     profile, data->bda));
+		g_free (source_bdaddr_str);
 		*data->result = GNOME_VFS_ERROR_SERVICE_NOT_AVAILABLE;
 		sdp_close(sdp);
 		return -1;
@@ -373,7 +375,13 @@
 
 	d(g_printerr ("obex: Sent connect to '%s' channel %d (res = %d).\n", data->bda, channel, fd));
 
-	*data->result = GNOME_VFS_OK;
+	g_free (source_bdaddr_str);
+
+	if (fd < 0) {
+		*data->result = GNOME_VFS_ERROR_SERVICE_NOT_AVAILABLE;
+	} else {
+		*data->result = GNOME_VFS_OK;
+	}
 
 	return fd;
 }
@@ -432,7 +440,7 @@
 	data.fd = -1;
 
 	foreach_adapter(conn, adapter_get_dev, (gpointer)&data);
-	
+
 	connection_free (conn);
 	
 	return data.fd;


Index: gnome-vfs2-obexftp.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gnome-vfs2-obexftp/F-7/gnome-vfs2-obexftp.spec,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- gnome-vfs2-obexftp.spec	31 May 2007 14:18:02 -0000	1.1
+++ gnome-vfs2-obexftp.spec	1 Jun 2007 23:18:14 -0000	1.2
@@ -1,7 +1,7 @@
 Summary:	ObexFTP over Bluetooth support for GNOME
 Name:		gnome-vfs2-obexftp
 Version:	0.2
-Release:	6%{?dist}
+Release:	7%{?dist}
 License:	GPL
 Group:		Applications/Communications
 URL:		http://www.gnome.org/
@@ -28,6 +28,7 @@
 Patch2:		osso-gwobex-check-read-retval-2.patch
 
 Patch3:		gnome-vfs2-obexftp-use-rfcomm-sockets.patch
+Patch4:		gnome-vfs-obexftp-fix-crash-when-not-connected.patch
 
 %description
 gnome-vfs2-obexftp allows you to browse filesystems on mobile phones, or other
@@ -42,6 +43,7 @@
 %patch2 -p4 -b .read-retval-2
 popd
 %patch3 -p1 -b .rfcomm-sockets
+%patch4 -p1
 
 cp m4/jhflags.m4 acinclude.m4
 autoreconf
@@ -70,6 +72,10 @@
 %{_libdir}/gnome-vfs-2.0/modules/*.so
 
 %changelog
+* Sat Jun 02 2007 - Bastien Nocera <bnocera at redhat.com> - 0.2-7
+- Fix crash when we can't connect through an rfcomm socket, reported
+  by Olivier Fourdan
+
 * Wed May 30 2007 - Bastien Nocera <bnocera at redhat.com> - 0.2-6
 - Fix description, this package isn't split from gnome-vfs2
 - Add the dist to the release




More information about the fedora-extras-commits mailing list