diff options
author | murf <murf@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-07-18 14:35:07 +0000 |
---|---|---|
committer | murf <murf@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-07-18 14:35:07 +0000 |
commit | 7a12ef01a3e4bc7db7974006242694bb7d036751 (patch) | |
tree | 51e53d2e5ce6eb99153f81f9d0580caa88b33759 /pbx | |
parent | 0d7a3c10c6b3e3843738b030988106509b423adb (diff) |
This corrects the problem with flags and %lld formats on 64-bit machines, where uint64_t is NOT acceptable for %lld, and also works on 32-bit machines. At least, with gcc.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75585 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx')
-rw-r--r-- | pbx/pbx_dundi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pbx/pbx_dundi.c b/pbx/pbx_dundi.c index 59e43a976..472c92bd1 100644 --- a/pbx/pbx_dundi.c +++ b/pbx/pbx_dundi.c @@ -893,7 +893,7 @@ static int cache_save(dundi_eid *eidpeer, struct dundi_request *req, int start, if (strchr(req->dr[x].dest, '|')) continue; snprintf(data + strlen(data), sizeof(data) - strlen(data), "%lld/%d/%d/%s/%s|", - req->dr[x].flags, req->dr[x].weight, req->dr[x].techint, req->dr[x].dest, + (unsigned long long)req->dr[x].flags, req->dr[x].weight, req->dr[x].techint, req->dr[x].dest, dundi_eid_to_str_short(eidpeer_str, sizeof(eidpeer_str), &req->dr[x].eid)); } ast_db_put("dundi/cache", key1, data); @@ -1154,7 +1154,7 @@ static int cache_lookup_internal(time_t now, struct dundi_request *req, char *ke if (option_debug) ast_log(LOG_DEBUG, "Found cache expiring in %d seconds!\n", expiration); ptr += length + 1; - while((sscanf(ptr, "%lld/%d/%d/%n", &(flags.flags), &weight, &tech, &length) == 3)) { + while((sscanf(ptr, "%lld/%d/%d/%n", (unsigned long long*)&(flags.flags), &weight, &tech, &length) == 3)) { ptr += length; term = strchr(ptr, '|'); if (term) { |