summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsangwan.kwon <sangwan.kwon@samsung.com>2016-03-15 16:39:07 +0900
committersangwan.kwon <sangwan.kwon@samsung.com>2016-03-15 16:39:07 +0900
commit43c1e9355155d04a285a9a0d3fd67ef1d3cadc4a (patch)
treeb19abe31b3db61b6d5e8c7f2376fc408418062ca
parent0460c95e1cddfc1e2453bf41a72230997b703835 (diff)
downloadcert-checker-accepted/tizen/common/20160321.150604.tar.gz
cert-checker-accepted/tizen/common/20160321.150604.tar.bz2
cert-checker-accepted/tizen/common/20160321.150604.zip
* use GetErrnoString() instead of it Change-Id: I0d767d423be26987d387ad1b1c5899d7f36a27b3 Signed-off-by: sangwan.kwon <sangwan.kwon@samsung.com>
-rw-r--r--src/ui/popup-bin/CMakeLists.txt5
-rw-r--r--src/ui/popup-bin/popup.cpp8
2 files changed, 11 insertions, 2 deletions
diff --git a/src/ui/popup-bin/CMakeLists.txt b/src/ui/popup-bin/CMakeLists.txt
index 2b89d2f..8c2ac68 100644
--- a/src/ui/popup-bin/CMakeLists.txt
+++ b/src/ui/popup-bin/CMakeLists.txt
@@ -34,7 +34,11 @@ set(CERT_CHECKER_POPUP_SOURCES
# logs
${CERT_CHECKER_SRC_PATH}/log/log.cpp
# dpl
+ ${CERT_CHECKER_SRC_PATH}/dpl/core/src/assert.cpp
+ ${CERT_CHECKER_SRC_PATH}/dpl/core/src/exception.cpp
${CERT_CHECKER_SRC_PATH}/dpl/core/src/serialization.cpp
+ ${CERT_CHECKER_SRC_PATH}/dpl/core/src/errno_string.cpp
+ ${CERT_CHECKER_SRC_PATH}/dpl/core/src/noncopyable.cpp
)
ADD_DEFINITIONS(${CERT_CHECKER_POPUP_DEP_CFLAGS})
@@ -43,6 +47,7 @@ INCLUDE_DIRECTORIES(
${CERT_CHECKER_POPUP_SRC_DIR}
${CERT_CHECKER_POPUP_DEP_INCLUDE_DIRS}
${CERT_CHECKER_SRC_PATH}/include/
+ ${CERT_CHECKER_SRC_PATH}/dpl/core/include/
)
ADD_EXECUTABLE(${TARGET_CERT_CHECKER_POPUP}
diff --git a/src/ui/popup-bin/popup.cpp b/src/ui/popup-bin/popup.cpp
index 6b3032a..019ef04 100644
--- a/src/ui/popup-bin/popup.cpp
+++ b/src/ui/popup-bin/popup.cpp
@@ -35,6 +35,7 @@
#include <cchecker/UIBackend.h>
#include <cchecker/popup-runner.h>
#include <cchecker/dpl/serialization.h>
+#include <cchecker/dpl/errno_string.h>
using namespace CCHECKER::UI;
@@ -172,7 +173,9 @@ static int wait_for_parent_info (int pipe_in)
int sel = select(pipe_in + 1, &readfds, NULL, NULL, &timeout);
if (sel == -1) {
- LogError("Cannot get info from parent. Exit popup - ERROR (" << errno << ")");
+ int error = errno;
+ LogError("Cannot get info from parent. Exit popup");
+ LogError("Error: " << CCHECKER::GetErrnoString(error));
close(pipe_in);
return -1;
}
@@ -260,10 +263,11 @@ elm_main(int argc, char **argv)
count = TEMP_FAILURE_RETRY(read(pipe_in, line, buff_size));
} while (0 == count);
if(count < 0){
+ int error = errno;
close(pipe_in);
close(pipe_out);
LogError("read returned a negative value (" << count <<")");
- LogError("errno: " << strerror( errno ) );
+ LogError("error: " << CCHECKER::GetErrnoString(error));
LogError("Exit popup - ERROR");
return popup_status::EXIT_ERROR;
}