summaryrefslogtreecommitdiff
path: root/print/hplip/files/patch-protocol_discovery_mdns.c
diff options
context:
space:
mode:
Diffstat (limited to 'print/hplip/files/patch-protocol_discovery_mdns.c')
-rw-r--r--print/hplip/files/patch-protocol_discovery_mdns.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/print/hplip/files/patch-protocol_discovery_mdns.c b/print/hplip/files/patch-protocol_discovery_mdns.c
index 909ceaa8a2bb..06c2bbfca10d 100644
--- a/print/hplip/files/patch-protocol_discovery_mdns.c
+++ b/print/hplip/files/patch-protocol_discovery_mdns.c
@@ -1,4 +1,4 @@
---- protocol/discovery/mdns.c.orig 2016-08-26 10:04:47 UTC
+--- protocol/discovery/mdns.c.orig 2019-10-22 06:18:12 UTC
+++ protocol/discovery/mdns.c
@@ -24,7 +24,11 @@
Author: Sanjay Kumar
@@ -13,15 +13,15 @@
#include <string.h>
#include <syslog.h>
#include <sys/socket.h>
-@@ -89,6 +93,11 @@ static int mdns_open_socket(int *psocket
- BUG("unable to setsockopt: %m\n");
- goto bugout;
- }
-+ if (setsockopt(udp_socket, SOL_SOCKET, SO_REUSEPORT, &yes, sizeof(yes)) == -1)
+@@ -85,6 +89,11 @@ static int mdns_open_socket(int *psocket)
+
+ /* Get rid of "address already in use" error message. */
+ if (setsockopt(udp_socket, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(yes)) == -1)
+ {
+ BUG("unable to setsockopt: %m\n");
+ goto bugout;
+ }
-
- /* Bind the socket to port and IP equal to INADDR_ANY. */
- bzero(&recv_addr, sizeof(recv_addr));
++ if (setsockopt(udp_socket, SOL_SOCKET, SO_REUSEPORT, &yes, sizeof(yes)) == -1)
+ {
+ BUG("unable to setsockopt: %m\n");
+ goto bugout;