INCLUDE+=-Iinclude -I../include
ASTCFLAGS+=-pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(DEBUG) $(INCLUDE) -D_REENTRANT -D_GNU_SOURCE #-DMAKE_VALGRIND_HAPPY
ASTCFLAGS+=$(OPTIMIZE)
-ASTCFLAGS+= -Werror -Wunused
+ASTCFLAGS+=# -Werror -Wunused
ifeq ($(shell gcc -v 2>&1 | grep 'gcc version' | cut -f3 -d' ' | cut -f1 -d.),4)
ASTCFLAGS+= -Wno-pointer-sign
endif
int expiration;
char fs[256];
time_t timeout;
+ unsigned int x;
/* Build request string */
if (!ast_db_get("dundi/cache", key, data, sizeof(data))) {
ptr = data;
- if (sscanf(ptr, "%d|%n", (int *)&timeout, &length) == 1) {
+ if (sscanf(ptr, "%d|%n", (int *)&x, &length) == 1) {
+ timeout = x;
expiration = timeout - now;
if (expiration > 0) {
ast_log(LOG_DEBUG, "Found cache expiring in %d seconds!\n", (int)(timeout - now));
char *last=NULL;
char tmp[256];
time_t expired;
+ unsigned int x;
ast_db_get(secretpath, "secretexpiry", tmp, sizeof(tmp));
- if (sscanf(tmp, "%d", (int *)&expired) == 1) {
+ if (sscanf(tmp, "%d", (int *)&x) == 1) {
+ expired = x;
ast_db_get(secretpath, "secret", tmp, sizeof(tmp));
current = strchr(tmp, ';');
if (!current)