diff options
author | hyunuktak <hyunuk.tak@samsung.com> | 2015-08-07 17:11:34 +0900 |
---|---|---|
committer | hyunuktak <hyunuk.tak@samsung.com> | 2015-08-07 17:11:56 +0900 |
commit | 6aa4055ef0544ae85457c25c510fe3db04949c43 (patch) | |
tree | 94018be3cef92c33b60650c488dc15536c8f978a /src/config.c | |
parent | bc55a3df0d4d2d97964ce2fadc9fe3ffc4953f4e (diff) | |
download | connman-6aa4055ef0544ae85457c25c510fe3db04949c43.tar.gz connman-6aa4055ef0544ae85457c25c510fe3db04949c43.tar.bz2 connman-6aa4055ef0544ae85457c25c510fe3db04949c43.zip |
Base Code merged to SPIN 2.4submit/tizen/20150810.034432
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.c | 6 |
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)); |