Merge pull request #92 from painless-security/jennifer/reduce_logging
[trust_router.git] / tid / tids.c
index ddd91b0..a984b8d 100644 (file)
@@ -356,7 +356,7 @@ nfds_t tids_get_listener(TIDS_INSTANCE *tids,
                          TIDS_REQ_FUNC *req_handler,
                          tids_auth_func *auth_handler,
                          const char *hostname,
-                         unsigned int port,
+                         int port,
                          void *cookie,
                          int *fd_out,
                          size_t max_fd)
@@ -464,7 +464,7 @@ int tids_accept(TIDS_INSTANCE *tids, int listen)
   struct tid_process tp = {0};
 
   if (0 > (conn = tr_sock_accept(listen))) {
-    tr_err("tids_accept: Error accepting connection");
+    tr_debug("tids_accept: Error accepting connection");
     return 1;
   }
 
@@ -574,12 +574,12 @@ void tids_sweep_procs(TIDS_INSTANCE *tids)
 }
 
 /* Process tids requests forever. Should not return except on error. */
-int tids_start (TIDS_INSTANCE *tids,
-                TIDS_REQ_FUNC *req_handler,
-                tids_auth_func *auth_handler,
-                const char *hostname,
-                unsigned int port,
-                void *cookie)
+int tids_start(TIDS_INSTANCE *tids,
+               TIDS_REQ_FUNC *req_handler,
+               tids_auth_func *auth_handler,
+               const char *hostname,
+               int port,
+               void *cookie)
 {
   int fd[TR_MAX_SOCKETS]={0};
   nfds_t n_fd=0;
@@ -623,7 +623,7 @@ int tids_start (TIDS_INSTANCE *tids,
 
       if (poll_fd[ii].revents & POLLIN) {
         if (tids_accept(tids, poll_fd[ii].fd))
-          tr_err("tids_start: error in tids_accept().");
+          tr_debug("tids_start: error in tids_accept().");
       }
     }
   }