summaryrefslogtreecommitdiff
path: root/pbx
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2005-12-26 18:35:28 +0000
committerRussell Bryant <russell@russellbryant.com>2005-12-26 18:35:28 +0000
commitef1ce7aec97d775fc12fd11913a07560e0fb1250 (patch)
tree41d8725d44201cdf6c2486ce678b1b68e09a7227 /pbx
parentdc51afacc67bcf929fa7b56f1ccbc55f00b3b460 (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: https://origsvn.digium.com/svn/asterisk/trunk@7635 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'pbx')
-rw-r--r--pbx/pbx_dundi.c6
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)