From 3a89a77e79407d0d638ddf983ee580410cf807c5 Mon Sep 17 00:00:00 2001
From: wangzhengquan <wangzhengquan85@126.com>
Date: 星期二, 04 八月 2020 15:56:12 +0800
Subject: [PATCH] fix sendto

---
 src/util/sem_util.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/util/sem_util.c b/src/util/sem_util.c
index 4f294c0..bf08adf 100644
--- a/src/util/sem_util.c
+++ b/src/util/sem_util.c
@@ -72,6 +72,7 @@
 
 /* Reserve semaphore - decrement it by 1 */
 int SemUtil::dec(int semId) {
+// logger.debug("%d: SemUtil::dec\n", semId);
   struct sembuf sops;
 
   sops.sem_num = 0;
@@ -103,7 +104,7 @@
   return 0;
 }
 
-int SemUtil::dec_timeout(int semId, struct timespec *timeout) {
+int SemUtil::dec_timeout(const int semId, const struct timespec *timeout) {
   struct sembuf sops;
 
   sops.sem_num = 0;
@@ -112,7 +113,7 @@
 
   while (semtimedop(semId, &sops, 1, timeout) == -1)
     if (errno != EINTR) {
-      err_msg(errno, "SemUtil::dec_timeout");
+      //err_msg(errno, "SemUtil::dec_timeout");
       return -1;
     }
 
@@ -121,6 +122,7 @@
 
 /* Release semaphore - increment it by 1 */
 int SemUtil::inc(int semId) {
+logger.debug("%d: SemUtil::inc\n", semId);
   struct sembuf sops;
 
   sops.sem_num = 0;

--
Gitblit v1.8.0