From 9af4eb021fd5b34ec1fa4ee6eb01eab0b3924ebc Mon Sep 17 00:00:00 2001 From: raveit65 Date: Sat, 13 Oct 2012 00:42:44 +0200 Subject: fix incorrect FSF address --- src/http.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/http.c') diff --git a/src/http.c b/src/http.c index 0e198aa..1dff01d 100644 --- a/src/http.c +++ b/src/http.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * * Authors: Alexander Larsson * -- cgit v1.2.1 From 366798a5cd8020de0c1771ca58e2b5c02ce6a482 Mon Sep 17 00:00:00 2001 From: Jasmine Hassan Date: Mon, 29 Oct 2012 07:15:08 +0200 Subject: [http] Fix http sharing not workin on Linux 3.0 gnome-user-share tries to discover a free port to run Apache on by bind()ing a struct sockaddr_in with no port specified in src/http.c:get_port(). However, it neglects to specify an address family, so that attempt fails with EINVAL, and the -1 returned gets passed to spawn_httpd() as the port that Apache should be listening on, which causes to Apache promptly and silently bail. This error was caused by a regression in Linux 3.0: http://thread.gmane.org/gmane.linux.network/205326/focus=205328 https://bugzilla.gnome.org/show_bug.cgi?id=660146 http://git.gnome.org/browse/gnome-user-share/commit/?id=24cc0e2ecc60619af0e51e730ef68bf750182dcf --- src/http.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/http.c') diff --git a/src/http.c b/src/http.c index 1dff01d..c07a202 100644 --- a/src/http.c +++ b/src/http.c @@ -79,6 +79,7 @@ get_port (void) memset (&addr, 0, sizeof (addr)); addr.sin_port = 0; addr.sin_addr.s_addr = INADDR_ANY; + addr.sin_family = AF_INET; reuse = 1; setsockopt (sock, SOL_SOCKET, SO_REUSEADDR, &reuse, sizeof (reuse)); -- cgit v1.2.1