From dd5a4aa12c5bd913be552b415a0268e9ef9ea9fd Mon Sep 17 00:00:00 2001
From: AIOS User <basic@aios.aios.baisc>
Date: 星期二, 31 八月 2021 14:01:16 +0800
Subject: [PATCH] build *.proto to cpp

---
 src/bh_api.cpp |   21 +++++++++------------
 1 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/src/bh_api.cpp b/src/bh_api.cpp
index b492faa..8770bdf 100644
--- a/src/bh_api.cpp
+++ b/src/bh_api.cpp
@@ -7,11 +7,8 @@
 #include "bh_api.h"
 #include <pthread.h>
 #include <getopt.h>
-#include "bhome_msg_api.pb.h"
-#include "bhome_msg.pb.h"
-#include "error_msg.pb.h"
-#include "proto/bhome_msg.pb.h"
-#include "proto/bhome_msg_api.pb.h"
+#include "../proto/source/bhome_msg.pb.h"
+#include "../proto/source/bhome_msg_api.pb.h"
 
 static Logger *logger = LoggerFactory::getLogger();
 
@@ -906,7 +903,7 @@
 }
 
 #if defined(PRO_DE_SERIALIZE)
-int BHPublish(const char *msgpub, const char msgpub_len, const int timeout_ms)
+int BHPublish(const char *msgpub, const int msgpub_len, const int timeout_ms)
 #else
 int BHPublish(const char *topic, const char *content, const int timeout_ms)
 #endif
@@ -1275,6 +1272,12 @@
   int sec, nsec;
   char topics_buf[MAX_STR_LEN] = { 0x00 };
   
+  struct _RequestReply
+  {
+    std::string proc_id;
+    std::string data;
+  }rr;
+
 #if defined(PRO_DE_SERIALIZE)
   struct _BHAddress
 	{
@@ -1290,12 +1293,6 @@
 		const char *data;
 	}_input1;
 
-  struct _RequestReply
-  {
-    std::string proc_id;
-    std::string data;
-  }rr;
-  
   ::bhome_msg::BHAddress input0;
 	::bhome_msg::MsgRequestTopic input1;
 	if (!input0.ParseFromArray(remote, remote_len) || !input1.ParseFromArray(request, request_len)) {

--
Gitblit v1.8.0