projects
/
platform
/
core
/
uifw
/
multi-assistant-service.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3d4d680
)
Change localtime to localtime_r for thread safety
74/266174/1
author
wn.jang
<wn.jang@samsung.com>
Tue, 9 Nov 2021 02:02:05 +0000
(11:02 +0900)
committer
wn.jang
<wn.jang@samsung.com>
Tue, 9 Nov 2021 02:02:05 +0000
(11:02 +0900)
Change-Id: I809c8460625f2a10641252b6f0f43ec3853e12e6
src/service_main.cpp
patch
|
blob
|
history
diff --git
a/src/service_main.cpp
b/src/service_main.cpp
index
866cf20
..
e3482e6
100644
(file)
--- a/
src/service_main.cpp
+++ b/
src/service_main.cpp
@@
-341,7
+341,9
@@
int CServiceMain::client_set_background_volume(pid_t pid, double ratio)
for (auto item : history) {
std::time_t time_info = std::get<3>(item);
char time_string[32];
- std::strftime(time_string, sizeof(time_string), "%H%M%S", std::localtime(&time_info));
+ struct tm tm;
+ localtime_r(&time_info, &tm);
+ std::strftime(time_string, sizeof(time_string), "%H%M%S", &tm);
ss << "[";
ss << std::get<0>(item);
ss << ",";