diff -r 38bf6dd8f4e7 -r 155cbab9eefd src/server/util/util.c --- a/src/server/util/util.c Wed Oct 26 15:53:56 2016 +0200 +++ b/src/server/util/util.c Thu Oct 27 16:56:00 2016 +0200 @@ -381,6 +381,18 @@ return def; } +NSAPI_PUBLIC int util_strtoint(char *str, int64_t *value) { + char *end; + errno = 0; + int64_t val = strtoll(str, &end, 0); + if(errno == 0) { + *value = val; + return 1; + } else { + return 0; + } +} + /* ------------------------------ util_itoa ------------------------------- */ /*