summaryrefslogtreecommitdiff
path: root/src/config.c
diff options
context:
space:
mode:
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 61cf8aeb..8ae1764d 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));