summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--rdcp_error.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/rdcp_error.c b/rdcp_error.c
index f688eaf..c22af53 100644
--- a/rdcp_error.c
+++ b/rdcp_error.c
@@ -16,16 +16,12 @@ rdcp_error_quark (void)
const char *
rdcp_error_code_to_string(rdcp_error_codes ec)
{
- static char buf[80];
-
switch(ec) {
case RDCP_ERROR_INTERNAL: return "RDCP_ERROR_INTERNAL";
case RDCP_ERROR_INVALID_ARG: return "RDCP_ERROR_INVALID_ARG";
case RDCP_ERROR_INVALID_INSTANCE_ID: return "RDCP_ERROR_INVALID_INSTANCE_ID";
case RDCP_ERROR_DBUS: return "RDCP_ERROR_DBUS";
- default:
- snprintf(buf, sizeof(buf), "unknown error code (%d)", ec);
- return buf;
+ default: return "unknown error code";
}
}
@@ -68,7 +64,9 @@ handle_g_error(GError **g_error, const CMPIBroker* mb, CMPIStatus* st, CMPIrc rc
g_string_append(message, ": ");
}
- g_string_append_printf(message, "(%s) ", rdcp_error_code_to_string((*g_error)->code));
+ g_string_append_printf(message, "(%s(%d)) ",
+ rdcp_error_code_to_string((*g_error)->code),
+ (*g_error)->code);
g_string_append(message, (*g_error)->message);
g_error_free(*g_error);
*g_error = NULL;