From 9b8407501c13275a831942578bf52e3a7b0b3248 Mon Sep 17 00:00:00 2001 From: Yuta Doi Date: Mon, 13 Nov 2017 14:56:16 +0900 Subject: Remove the setenv The setenv process which sets surface_id to QT_IVI_SURFACE_ID depends on Qt, so it is removed. The setenv process was moved to qlibwindowmanager. Change-Id: I8ed6d25beb6638836fd7d54e5bf722ed14a246bc Signed-off-by: Yuta Doi --- src/libwindowmanager.cpp | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/libwindowmanager.cpp b/src/libwindowmanager.cpp index efa9721..57e4c04 100644 --- a/src/libwindowmanager.cpp +++ b/src/libwindowmanager.cpp @@ -263,24 +263,14 @@ int LibWindowmanager::Impl::requestSurface(json_object *object) { this->api_call("RequestSurface", object, [&rc](bool ok, json_object *j) { if (ok) { json_object *val; - int id; if (json_object_object_get_ex(j, "response", &val)) { - id = json_object_get_int(val); + rc = json_object_get_int(val); } else { HMI_ERROR("libwm", "Not found key \"response\""); rc = -EINVAL; return; } - char *buf; - asprintf(&buf, "%d", id); - printf("setenv(\"QT_IVI_SURFACE_ID\", %s, 1)\n", buf); - if (setenv("QT_IVI_SURFACE_ID", buf, 1) != 0) { - HMI_ERROR("libwm", "putenv failed: %m"); - rc = -errno; - } else { - rc = id; // Single point of success - } } else { HMI_ERROR("libwm", "Could not get surface ID from WM: %s", j != nullptr ? json_object_to_json_string_ext( -- cgit 1.2.3-korg