From 4c73fd7179e92bee9cccb65e46823b00f568acb3 Mon Sep 17 00:00:00 2001 From: wangzhengquan <wangzhengquan85@126.com> Date: 星期五, 22 一月 2021 16:57:34 +0800 Subject: [PATCH] tmp --- src/socket/shm_mod_socket.cpp | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/socket/shm_mod_socket.cpp b/src/socket/shm_mod_socket.cpp index 0f55b6b..54effbe 100644 --- a/src/socket/shm_mod_socket.cpp +++ b/src/socket/shm_mod_socket.cpp @@ -51,7 +51,7 @@ } // 鍙戦�佷俊鎭珛鍒昏繑鍥炪�� int ShmModSocket::sendto_nowait( const void *buf, const int size, const int key){ - return shm_sendto(shm_socket, buf, size, key, NULL, (int)SHM_MSG_NOWAIT); + return shm_sendto(shm_socket, buf, size, key, NULL, (int)BUS_NOWAIT_FLAG); } @@ -62,7 +62,7 @@ */ int ShmModSocket::recvfrom(void **buf, int *size, int *key) { int rv = shm_recvfrom(shm_socket, buf, size, key, NULL, 0); - // logger->error(rv, "ShmModSocket::recvfrom failed!"); + return rv; } @@ -74,7 +74,7 @@ } int ShmModSocket::recvfrom_nowait( void **buf, int *size, int *key){ - int rv = shm_recvfrom(shm_socket, buf, size, key, NULL, (int)SHM_MSG_NOWAIT); + int rv = shm_recvfrom(shm_socket, buf, size, key, NULL, (int)BUS_NOWAIT_FLAG); // logger->error(rv, "ShmModSocket::recvfrom_nowait failed!"); return rv; } @@ -92,7 +92,7 @@ return shm_sendandrecv(shm_socket, send_buf, send_size, send_key, recv_buf, recv_size, timeout, 0); } int ShmModSocket::sendandrecv_nowait(const void *send_buf, const int send_size, const int send_key, void **recv_buf, int *recv_size){ - return shm_sendandrecv(shm_socket, send_buf, send_size, send_key, recv_buf, recv_size, 0, (int)SHM_MSG_NOWAIT); + return shm_sendandrecv(shm_socket, send_buf, send_size, send_key, recv_buf, recv_size, 0, (int)BUS_NOWAIT_FLAG); } int ShmModSocket::sendandrecv_unsafe( const void *send_buf, const int send_size, const int send_key, void **recv_buf, int *recv_size){ @@ -103,7 +103,7 @@ return shm_sendandrecv_unsafe(shm_socket, send_buf, send_size, send_key, recv_buf, recv_size, timeout, 0); } int ShmModSocket::sendandrecv_unsafe_nowait(const void *send_buf, const int send_size, const int send_key, void **recv_buf, int *recv_size){ - return shm_sendandrecv_unsafe(shm_socket, send_buf, send_size, send_key, recv_buf, recv_size, 0, (int)SHM_MSG_NOWAIT); + return shm_sendandrecv_unsafe(shm_socket, send_buf, send_size, send_key, recv_buf, recv_size, 0, (int)BUS_NOWAIT_FLAG); } @@ -123,7 +123,7 @@ return _sub_(topic, size, key, timeout, 0); } int ShmModSocket::sub_nowait(char *topic, int size, int key) { - return _sub_(topic, size, key, NULL, (int)SHM_MSG_NOWAIT); + return _sub_(topic, size, key, NULL, (int)BUS_NOWAIT_FLAG); } @@ -142,7 +142,7 @@ return _desub_(topic, size, key, timeout, 0); } int ShmModSocket::desub_nowait(char *topic, int size, int key) { - return _desub_(topic, size, key, NULL, (int)SHM_MSG_NOWAIT); + return _desub_(topic, size, key, NULL, (int)BUS_NOWAIT_FLAG); } @@ -161,7 +161,7 @@ return _pub_( topic, topic_size, content, content_size, key, timeout, 0); } int ShmModSocket::pub_nowait(char *topic, int topic_size, void *content, int content_size, int key){ - return _pub_(topic, topic_size, content, content_size, key, NULL, (int)SHM_MSG_NOWAIT); + return _pub_(topic, topic_size, content, content_size, key, NULL, (int)BUS_NOWAIT_FLAG); } -- Gitblit v1.8.0