Fu Juntang
2021-08-30 4fddc45ec1671304592c14ae970162c9c2518d06
src/bus_error.cpp
@@ -11,14 +11,20 @@
static pthread_key_t strerrorKey;
static char *_bus_errlist[_bus_nerr] = {
static const char *_bus_errlist[_bus_nerr] = {
  "\0",
  "Timed out",
  "The other end is not inline",
  "Key already in use",
  "Network fault",
  "Send to self error",
  "Receive from wrong end"
  "Receive from wrong end",
  "Service stoped",
  "Exceed resource limit",
  "Service not supported",
  "Resource busy",
  "Resource not provide",
  "Invalid parameters"
};
@@ -48,6 +54,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");