summaryrefslogtreecommitdiff
path: root/src/config.c
diff options
context:
space:
mode:
authorhyunuktak <hyunuk.tak@samsung.com>2015-08-07 08:11:34 (GMT)
committerhyunuktak <hyunuk.tak@samsung.com>2015-08-07 08:11:56 (GMT)
commit6aa4055ef0544ae85457c25c510fe3db04949c43 (patch)
tree94018be3cef92c33b60650c488dc15536c8f978a /src/config.c
parentbc55a3df0d4d2d97964ce2fadc9fe3ffc4953f4e (diff)
downloadconnman-6aa4055ef0544ae85457c25c510fe3db04949c43.zip
connman-6aa4055ef0544ae85457c25c510fe3db04949c43.tar.gz
connman-6aa4055ef0544ae85457c25c510fe3db04949c43.tar.bz2
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com> Change-Id: I84a42375b5c59739e4caca1f726699ea7647ef17
Diffstat (limited to 'src/config.c')
-rwxr-xr-x[-rw-r--r--]src/config.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/config.c b/src/config.c
index 61cf8ae..8ae1764 100644..100755
--- a/src/config.c
+++ b/src/config.c
@@ -891,7 +891,7 @@ static void config_notify_handler(struct inotify_event *event,
return;
}
- if (event->mask & IN_CREATE)
+ if (event->mask & IN_CREATE || event->mask & IN_MOVED_TO)
create_config(ident);
if (event->mask & IN_MODIFY) {
@@ -1430,12 +1430,14 @@ static void generate_random_string(char *str, int length)
{
uint8_t val;
int i;
+ uint64_t rand;
memset(str, '\0', length);
for (i = 0; i < length-1; i++) {
do {
- val = (uint8_t)(random() % 122);
+ __connman_util_get_random(&rand);
+ val = (uint8_t)(rand % 122);
if (val < 48)
val += 48;
} while((val > 57 && val < 65) || (val > 90 && val < 97));