From dd0714b75b2e29087e3cd1184995bf38a453d833 Mon Sep 17 00:00:00 2001
From: wangzhengquan <wangzhengquan85@126.com>
Date: 星期一, 01 二月 2021 17:36:13 +0800
Subject: [PATCH] update

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

diff --git a/src/socket/shm_mod_socket.cpp b/src/socket/shm_mod_socket.cpp
index 760c421..02b91f0 100644
--- a/src/socket/shm_mod_socket.cpp
+++ b/src/socket/shm_mod_socket.cpp
@@ -102,7 +102,7 @@
  * @size 涓婚闀垮害
  * @key 鎬荤嚎绔彛
  */
-int  ShmModSocket::sub(char *topic, int topic_size, int key,  
+int  ShmModSocket::sub(const char *topic, int topic_size, int key,  
 	const struct timespec *timeout, int flags) {
 	int ret;
 	bus_head_t head = {};
@@ -133,7 +133,7 @@
  * @size 涓婚闀垮害
  * @key 鎬荤嚎绔彛
  */
-int  ShmModSocket::desub(char *topic, int topic_size, int key, const struct timespec *timeout, int flags) {
+int  ShmModSocket::desub(const char *topic, int topic_size, int key, const struct timespec *timeout, int flags) {
 	// char buf[8192];
 	int ret;
 	if(topic == NULL) {
@@ -171,7 +171,7 @@
  * @content 涓婚鍐呭
  * @key 鎬荤嚎绔彛
  */
-int  ShmModSocket::pub(char *topic, int topic_size, void *content, int content_size, int key, const struct timespec *timeout, int flags) {
+int  ShmModSocket::pub(const char *topic, int topic_size, const void *content, int content_size, int key, const struct timespec *timeout, int flags) {
 	int ret;
 	bus_head_t head = {};
 	memcpy(head.action, "pub", sizeof(head.action));
@@ -204,7 +204,7 @@
 // =============================================================================
 
 int ShmModSocket::get_bus_sendbuf(bus_head_t &request_head, 
-  void *topic_buf, int topic_size, void *content_buf, int content_size, void **retbuf) {
+ const void *topic_buf, int topic_size, const void *content_buf, int content_size, void **retbuf) {
  
   int buf_size;
   char *buf;

--
Gitblit v1.8.0