From 5add39f46c8323875fb56bc764a8ff627ad82f18 Mon Sep 17 00:00:00 2001
From: Fu Juntang <StrongTiger_001@163.com>
Date: 星期五, 08 十月 2021 11:12:06 +0800
Subject: [PATCH] Adjust the free action independent of the return value from the function return.

---
 src/socket/shm_mod_socket.cpp |   12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/src/socket/shm_mod_socket.cpp b/src/socket/shm_mod_socket.cpp
index a94b9c3..6139d34 100644
--- a/src/socket/shm_mod_socket.cpp
+++ b/src/socket/shm_mod_socket.cpp
@@ -38,10 +38,6 @@
 	return shm_socket_force_bind(shm_socket, key);
 }
 
-int ShmModSocket::bind_proc_id(char *buf, int len) {
-  return shm_socket_bind_proc_id(shm_socket, buf, len);
-}
-
 int ShmModSocket::reg(void *pData, int len, void **buf, int *size, const int timeout_ms, int flag)
 {
   int ret;
@@ -166,8 +162,8 @@
  * @key 鍙戦�佺粰璋�
  * @return 0 鎴愬姛锛� 鍏朵粬鍊� 澶辫触鐨勯敊璇爜
  */
-int ShmModSocket::sendto(const void *buf, const int size, const int key, const struct timespec *timeout, int flag) {
-	int rv = shm_sendto(shm_socket, buf, size, key, timeout, flag);
+int ShmModSocket::sendto(const void *buf, const int size, const int key, const struct timespec *timeout, int flag, int reset, int data_set) {
+	int rv = shm_sendto(shm_socket, buf, size, key, timeout, flag, reset, data_set);
   if(rv == 0) {
 	  logger->debug("ShmModSocket::sendto: %d sendto %d success.\n", get_key(), key);
 	  return 0;
@@ -182,9 +178,9 @@
  * @key 浠庤皝鍝噷鏀跺埌鐨勪俊鎭�
  * @return 0 鎴愬姛锛� 鍏朵粬鍊� 澶辫触鐨勯敊璇爜
 */
-int ShmModSocket::recvfrom( void **buf, int *size, int *key, const struct timespec *timeout, int flag) {
+int ShmModSocket::recvfrom( void **buf, int *size, int *key, const struct timespec *timeout, int flag, int reset, int data_set) {
 
-  int rv =  shm_recvfrom(shm_socket, buf, size, key, timeout, flag);
+  int rv =  shm_recvfrom(shm_socket, buf, size, key, timeout, flag, reset, data_set);
 
 	if(rv == 0) {
     logger->debug("ShmModSocket::recvfrom: %d recvfrom %d success.\n", get_key(), *key);

--
Gitblit v1.8.0