* ecore: SO_REUSEADDR in all case.
authorcedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 21 Jan 2011 09:45:38 +0000 (09:45 +0000)
committercedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 21 Jan 2011 09:45:38 +0000 (09:45 +0000)
Patch thanks to Raoul Hecky < raoul.hecky at gmail.com >

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@56253 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/ecore_con/ecore_con.c

index 64a0052..279a3ee 100644 (file)
@@ -1439,12 +1439,12 @@ _ecore_con_cb_udp_listen(void           *data,
                             (const void *)&mreq6, sizeof(mreq6)) != 0)
                goto error;
           }
-
-        if (setsockopt(svr->fd, SOL_SOCKET, SO_REUSEADDR, (const void *)&on,
-                       sizeof(on)) != 0)
-          goto error;
      }
 
+   if (setsockopt(svr->fd, SOL_SOCKET, SO_REUSEADDR, (const void *)&on,
+                  sizeof(on)) != 0)
+     goto error;
+
    if (fcntl(svr->fd, F_SETFL, O_NONBLOCK) < 0)
      goto error;