Date: Wed, 28 Dec 2016 13:56:46 +0000 (UTC) From: Dmitry Marakasov <amdmi3@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r429770 - in head/multimedia/motion: . files Message-ID: <201612281356.uBSDukki024713@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: amdmi3 Date: Wed Dec 28 13:56:45 2016 New Revision: 429770 URL: https://svnweb.freebsd.org/changeset/ports/429770 Log: Fix daemon inability to bind to the sockey with the following error: http_bindsock: error binding on 127.0.0.1 port 8081 this problem was already fixed upstream. Added: head/multimedia/motion/files/patch-stream.c (contents, props changed) Modified: head/multimedia/motion/Makefile Modified: head/multimedia/motion/Makefile ============================================================================== --- head/multimedia/motion/Makefile Wed Dec 28 13:54:49 2016 (r429769) +++ head/multimedia/motion/Makefile Wed Dec 28 13:56:45 2016 (r429770) @@ -3,6 +3,7 @@ PORTNAME= motion PORTVERSION= 4.0.1 +PORTREVISION= 1 DISTVERSIONPREFIX= release- CATEGORIES= multimedia Added: head/multimedia/motion/files/patch-stream.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/multimedia/motion/files/patch-stream.c Wed Dec 28 13:56:45 2016 (r429770) @@ -0,0 +1,32 @@ +--- stream.c.orig 2016-10-25 01:39:24 UTC ++++ stream.c +@@ -727,9 +727,9 @@ int http_bindsock(int port, int local, i + const char *addr_str; + struct sockaddr_storage sin; + bzero(&sin, sizeof(struct sockaddr_storage)); +- sin.ss_family = ipv6_enabled?AF_INET6:AF_INET; + if (ipv6_enabled) { + struct sockaddr_in6 *sin6 = (struct sockaddr_in6*)&sin; ++ sin6->sin6_len = sizeof(struct sockaddr_in6); + sin6->sin6_family = AF_INET6; + sin6->sin6_port = htons(port); + if(local) { +@@ -741,6 +741,7 @@ int http_bindsock(int port, int local, i + } + } else { + struct sockaddr_in *sin4 = (struct sockaddr_in*)&sin; ++ sin4->sin_len = sizeof(struct sockaddr_in); + sin4->sin_family = AF_INET; + sin4->sin_port = htons(port); + if(local) { +@@ -752,8 +753,8 @@ int http_bindsock(int port, int local, i + } + } + +- if (bind(sd, (struct sockaddr*)&sin, sizeof(sin)) != 0) { +- MOTION_LOG(NTC, TYPE_STREAM, NO_ERRNO, "%s: error binding on %s port %d", addr_str, port); ++ if (bind(sd, (struct sockaddr*)&sin, sin.ss_len) != 0) { ++ MOTION_LOG(NTC, TYPE_STREAM, SHOW_ERRNO, "%s: error binding on %s port %d", addr_str, port); + close(sd); + return -1; + }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201612281356.uBSDukki024713>