If client exit as soon as async call, cynara_session_from_pid return null.
cynara_session_from_pid checks /proc/pid to verify client id.
===== reproduce =====
su - owner
dbus-send --type=method_call --system --dest=org.tizen.system.deviced /Org/Tizen/System/DeviceD/Display org.tizen.system.deviced.display.CustomBrightness
=====================
Signed-off-by: INSUN PYO <insun.pyo@samsung.com>
Change-Id: Ic313e9d4f9531135865824d8512b9eb1ac6f4c9e
unsigned long pid;
if (dbus_connection_get_unix_process_id(connection, &pid))
d->cynara_session_id = cynara_session_from_pid(pid);
+
+ /* If client exits as soon as async call, cynara_session_from_pid() returns null.
+ cynara_session_from_pid checks /proc/pid to verify process */
+ if (d->cynara_session_id == NULL)
+ asprintf (&d->cynara_session_id, "/proc/%ld", pid);
}
return d->cynara_session_id;
}