Fu Juntang
2021-09-04 658e74cc759db6fb6d51d5287749cff1cfd2a0a2
src/bus_error.cpp
@@ -11,7 +11,7 @@
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",
@@ -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");