summaryrefslogtreecommitdiffstats
path: root/src/vty
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-09-22 03:58:13 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-09-22 07:18:39 +0200
commit8e2f7e87f4d854e697c40545326a16e50614dd5c (patch)
tree4474fbe1c0fa0262167b980227efe0c7280f9280 /src/vty
parent13a8fb84f0d83f23e65daa528f2f392ec3b83a75 (diff)
add osmo_gettimeofday as a shim around gettimeofday
This allows feeding a custom time for unit tests by overriding osmo_gettimeofday. Change-Id: Ic7a81a6eb51f27fe452962b91f2eae2070d87089
Diffstat (limited to 'src/vty')
-rw-r--r--src/vty/command.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vty/command.c b/src/vty/command.c
index 483ca801..9d8bf314 100644
--- a/src/vty/command.c
+++ b/src/vty/command.c
@@ -637,7 +637,7 @@ static char *zencrypt(const char *passwd)
struct timeval tv;
char *crypt(const char *, const char *);
- gettimeofday(&tv, 0);
+ osmo_gettimeofday(&tv, 0);
to64(&salt[0], random(), 3);
to64(&salt[3], tv.tv_usec, 3);