fujuntang
2021-09-23 82b028cf63953d8080b63d85468eae488d212194
src/bh_api.cpp
@@ -530,9 +530,10 @@
    if (mtr_list_num > sizeof(mtr_list) / sizeof(mtr_list[0])) {
      mtr_list_num = sizeof(mtr_list) / sizeof(mtr_list[0]);
    }
    Proc_ptr = &(ptr->procData);
    for(int i = 0; i < mtr_list_num; i++) {
      mtr_list[i].proc_id = ptr->procData.proc_id;
      mtr_list[i].proc_id = (Proc_ptr + i)->proc_id;
      mtr_list[i].mq_id = ID_RSV;
      mtr_list[i].abs_addr = ABS_ID_RSV;
      mtr_list[i].ip = "127.0.0.1";
@@ -1162,6 +1163,7 @@
  int sec, nsec;
  std::string MsgID;
  int timeout_ms = 3000;
  char data_buf[MAX_STR_LEN] = { 0x00 };
  char buf_temp[MAX_STR_LEN] = { 0x00 };
  char *topics_buf = NULL;
  
@@ -1225,7 +1227,9 @@
  rv = net_mod_socket_reg(gNetmod_socket, buf_temp, strlen(buf_temp), &buf, &size, timeout_ms, PROC_QUE_STCS);
  if (rv == 0) {
    val = atoi((char *)buf);
    len = size > (sizeof(data_buf) - 1) ? (sizeof(data_buf) - 1) : size;
    memcpy(data_buf, (char *)buf, len);
    val = atoi((char *)data_buf);
    free(buf);
@@ -1316,6 +1320,7 @@
  net_node_t node;
  int node_size;  
  int recv_arr_size;
  char data_buf[MAX_STR_LEN] = { 0x00 };
  net_mod_recv_msg_t *recv_arr;
  net_mod_err_t *errarr;
  int errarr_size = 0;
@@ -1389,7 +1394,9 @@
  rv = net_mod_socket_reg(gNetmod_socket, buf_temp, strlen(buf_temp), &buf, &size, timeout_ms, PROC_QUE_STCS);
  if (rv == 0) {
    
    val = atoi((char *)buf);
    len = size > (sizeof(data_buf) - 1) ? (sizeof(data_buf) - 1) : size;
    memcpy(data_buf, (char *)buf, len);
    val = atoi((char *)data_buf);
    free(buf);
@@ -1401,7 +1408,6 @@
      len += strlen(_input1.data);
#endif
      data = net_mod_socket_svr_get(gNetmod_socket);
      topics_buf = (char *)malloc(len);
      if (topics_buf == NULL) {