wangzhengquan
2020-12-22 fa4a6c6b60abf5f950a1a896dad14f953027b0fa
update
1个文件已修改
8 ■■■■ 已修改文件
src/socket/shm_mod_socket.c 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/socket/shm_mod_socket.c
@@ -236,7 +236,7 @@
    memcpy(head.action, "desub", sizeof(head.action));
    head.topic_size = topic_size = strlen(topic) + 1;
    head.content_size = 0;
printf("sizeof(head.action) = %d\n", sizeof(head.action));
    void *buf;
    int size = get_bus_sendbuf(head, topic,  topic_size, NULL,  0, &buf);
    if(size > 0) {
@@ -328,7 +328,7 @@
  memcpy(tmp_ptr, head.action, sizeof(head.action));
  tmp_ptr += 4;
  tmp_ptr += sizeof(head.action);
  PUT(tmp_ptr, htonl(head.topic_size));
  tmp_ptr += 4;
@@ -343,13 +343,13 @@
  memcpy(head.action, tmp_ptr, sizeof(head.action));
  tmp_ptr += 4;
  tmp_ptr += sizeof(head.action);
  head.topic_size = ntohl(GET(tmp_ptr));
  tmp_ptr += 4;
  head.content_size = ntohl(GET(tmp_ptr));
 
printf("ShmModSocket::decode_bus_head action : %s\n", head.action);
  return head;
}