Fix fcntl call to set socket to non-blocking mode.
authorJennifer Richards <jennifer@painless-security.com>
Wed, 18 May 2016 14:04:29 +0000 (10:04 -0400)
committerJennifer Richards <jennifer@painless-security.com>
Wed, 18 May 2016 14:04:29 +0000 (10:04 -0400)
tid/tids.c

index 2ebe887..02bc6f6 100644 (file)
@@ -399,7 +399,7 @@ int tids_get_listener(TIDS_INSTANCE *tids,
     tr_debug("tids_get_listener: Opened port %d.", port);
     
     /* make this socket non-blocking */
-    if (0 != fcntl(listen, F_SETFD, O_NONBLOCK)) {
+    if (0 != fcntl(listen, F_SETFL, O_NONBLOCK)) {
       tr_debug("tids_get_listener: Error setting O_NONBLOCK.");
       close(listen);
       listen=-1;