From a300adf15342aa4d3b030698d40d61edb6272ea0 Mon Sep 17 00:00:00 2001
From: fujuntang <fujuntang@smartai.com>
Date: 星期二, 07 九月 2021 11:51:20 +0800
Subject: [PATCH] resize the buf allocation as dynamic allocate.

---
 src/bus_error.cpp |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/src/bus_error.cpp b/src/bus_error.cpp
index 913a771..29d5683 100644
--- a/src/bus_error.cpp
+++ b/src/bus_error.cpp
@@ -20,7 +20,12 @@
   "Send to self error",
   "Receive from wrong end",
   "Service stoped",
-  "Exceed resource limit"
+  "Exceed resource limit",
+  "Service not supported",
+  "Resource busy",
+  "Resource not provide",
+  "Invalid parameters",
+  "No enough memory"
 
 };
 
@@ -50,6 +55,10 @@
   char *buf;
   /* Make first caller allocate key for thread-specific data */
 
+  if (err == 0) {
+    err = EBUS_BASE;
+  }
+
   s = pthread_once(&once, createKey);
   if (s != 0)
     err_exit(s, "pthread_once");

--
Gitblit v1.8.0