diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-12-26 18:35:28 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-12-26 18:35:28 +0000 |
commit | ac9d70ac1281183d741ef1ecd8101a5eb5ee93fb (patch) | |
tree | 41d8725d44201cdf6c2486ce678b1b68e09a7227 /pbx/pbx_dundi.c | |
parent | b759554372b15d07ea48224bca996e3245b30e0d (diff) |
Merged revisions 7634 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r7634 | russell | 2005-12-26 13:19:12 -0500 (Mon, 26 Dec 2005) | 2 lines
cast time_t to an int in printf/scanf (issue #5635)
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7635 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx/pbx_dundi.c')
-rw-r--r-- | pbx/pbx_dundi.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pbx/pbx_dundi.c b/pbx/pbx_dundi.c index 1e5f7446f..86e35a7f7 100644 --- a/pbx/pbx_dundi.c +++ b/pbx/pbx_dundi.c @@ -1149,7 +1149,7 @@ static int cache_lookup_internal(time_t now, struct dundi_request *req, char *ke /* Build request string */ if (!ast_db_get("dundi/cache", key, data, sizeof(data))) { ptr = data; - if (sscanf(ptr, "%ld|%n", &timeout, &length) == 1) { + if (sscanf(ptr, "%d|%n", (int *)&timeout, &length) == 1) { expiration = timeout - now; if (expiration > 0) { ast_log(LOG_DEBUG, "Found cache expiring in %d seconds!\n", (int)(timeout - now)); @@ -2032,7 +2032,7 @@ static void save_secret(const char *newkey, const char *oldkey) snprintf(tmp, sizeof(tmp), "%s", newkey); rotatetime = time(NULL) + DUNDI_SECRET_TIME; ast_db_put(secretpath, "secret", tmp); - snprintf(tmp, sizeof(tmp), "%ld", rotatetime); + snprintf(tmp, sizeof(tmp), "%d", (int)rotatetime); ast_db_put(secretpath, "secretexpiry", tmp); } @@ -2044,7 +2044,7 @@ static void load_password(void) time_t expired; ast_db_get(secretpath, "secretexpiry", tmp, sizeof(tmp)); - if (sscanf(tmp, "%ld", &expired) == 1) { + if (sscanf(tmp, "%d", (int *)&expired) == 1) { ast_db_get(secretpath, "secret", tmp, sizeof(tmp)); current = strchr(tmp, ';'); if (!current) |