vcl: cleanup debug messages
[vpp.git] / src / vcl / sock_test_server.c
index 11c667c..2e678c3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Cisco and/or its affiliates.
+ * Copyright (c) 2017-2019 Cisco and/or its affiliates.
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at:
@@ -653,6 +653,14 @@ main (int argc, char **argv)
               errno_val);
       return rv;
     }
+  if (fcntl (ssm->listen_fd, F_SETFL, O_NONBLOCK) < 0)
+    {
+      errno_val = errno;
+      perror ("ERROR in main()");
+      fprintf (stderr, "SERVER: ERROR: fcntl failed (errno = %d)!\n",
+              errno_val);
+      return rv;
+    }
 
 #ifdef VCL_TEST
   rv = vppcom_session_listen (ssm->listen_fd, 10);
@@ -743,7 +751,7 @@ main (int argc, char **argv)
       _rfdset = ssm->rd_fdset;
 
 #ifdef VCL_TEST
-      rv = vppcom_select (ssm->nfds, (uint64_t *) rfdset, NULL, NULL, 0);
+      rv = vppcom_select (ssm->nfds, (unsigned long *) rfdset, NULL, NULL, 0);
 #else
       {
        struct timeval timeout;