From d9b6cf6137ab4f08dc0b0666f85b7a73d6adcd6f Mon Sep 17 00:00:00 2001 From: Myungki Lee Date: Tue, 22 Mar 2016 16:33:01 +0900 Subject: [PATCH] Use thread-safe function Change-Id: I78a659bba1153cd7d2b1e74f989729d3a3073888 Signed-off-by: Myungki Lee --- src/message-port.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/message-port.c b/src/message-port.c index dacd5ae..3764a4d 100755 --- a/src/message-port.c +++ b/src/message-port.c @@ -715,6 +715,7 @@ static bool send_message(GVariant *parameters, GDBusMethodInvocation *invocation message_port_local_port_info_s *mi; message_port_callback_info_s *callback_info; int local_reg_id = 0; + char buf[1024]; g_variant_get(parameters, "(ssbbssbus)", &local_appid, &local_port, &local_trusted, &bi_dir, &remote_appid, &remote_port, &remote_trusted, &len, &raw); @@ -791,7 +792,7 @@ static bool send_message(GVariant *parameters, GDBusMethodInvocation *invocation callback_info->gio_read = g_io_channel_unix_new(fd); if (!callback_info->gio_read) { - _LOGE("Error is %s\n", strerror(errno)); + _LOGE("Error is %s\n", strerror_r(errno, buf, sizeof(buf))); __callback_info_free(callback_info); return -1; } -- 2.7.4