diff options
author | Steve Murphy <murf@digium.com> | 2007-07-18 14:35:07 +0000 |
---|---|---|
committer | Steve Murphy <murf@digium.com> | 2007-07-18 14:35:07 +0000 |
commit | 5ac24b25d34d8ca4292696cf53ca5e33005f14ba (patch) | |
tree | 51e53d2e5ce6eb99153f81f9d0580caa88b33759 | |
parent | 674dbeb0cf72402326fcb68ed2124b71e06a917c (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: https://origsvn.digium.com/svn/asterisk/trunk@75585 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r-- | apps/app_voicemail.c | 2 | ||||
-rw-r--r-- | channels/chan_sip.c | 2 | ||||
-rw-r--r-- | main/channel.c | 2 | ||||
-rw-r--r-- | main/rtp.c | 2 | ||||
-rw-r--r-- | pbx/pbx_dundi.c | 4 | ||||
-rw-r--r-- | res/res_features.c | 2 |
6 files changed, 7 insertions, 7 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index b5897df55..4f3fd9968 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -2190,7 +2190,7 @@ static int sendmail(char *srcemail, struct ast_vm_user *vmu, int msgnum, char *c } if (!strcmp(format, "wav49")) format = "WAV"; - ast_debug(3, "Attaching file '%s', format '%s', uservm is '%d', global is %lld\n", attach, format, attach_user_voicemail, ast_test_flag((&globalflags), VM_ATTACH)); + ast_debug(3, "Attaching file '%s', format '%s', uservm is '%d', global is %lld\n", attach, format, attach_user_voicemail, (unsigned long long)ast_test_flag((&globalflags), VM_ATTACH)); /* Make a temporary file instead of piping directly to sendmail, in case the mail command hangs */ if ((p = vm_mkftemp(tmp)) == NULL) { diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 2f5c5c5c2..4a8ea4346 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -11536,7 +11536,7 @@ static int sip_show_channel(int fd, int argc, char *argv[]) ast_cli(fd, " Original uri: %s\n", cur->uri); if (!ast_strlen_zero(cur->cid_num)) ast_cli(fd, " Caller-ID: %s\n", cur->cid_num); - ast_cli(fd, " Need Destroy: %lld\n", ast_test_flag(&cur->flags[0], SIP_NEEDDESTROY)); + ast_cli(fd, " Need Destroy: %lld\n", (unsigned long long)ast_test_flag(&cur->flags[0], SIP_NEEDDESTROY)); ast_cli(fd, " Last Message: %s\n", cur->lastmsg); ast_cli(fd, " Promiscuous Redir: %s\n", ast_test_flag(&cur->flags[0], SIP_PROMISCREDIR) ? "Yes" : "No"); ast_cli(fd, " Route: %s\n", cur->route ? cur->route->hop : "N/A"); diff --git a/main/channel.c b/main/channel.c index be1b293fa..4acfe9fb3 100644 --- a/main/channel.c +++ b/main/channel.c @@ -2454,7 +2454,7 @@ done: int ast_internal_timing_enabled(struct ast_channel *chan) { int ret = ast_opt_internal_timing && chan->timingfd > -1; - ast_debug(5, "Internal timing is %s (option_internal_timing=%lld chan->timingfd=%d)\n", ret? "enabled": "disabled", ast_opt_internal_timing, chan->timingfd); + ast_debug(5, "Internal timing is %s (option_internal_timing=%lld chan->timingfd=%d)\n", ret? "enabled": "disabled", (unsigned long long)ast_opt_internal_timing, chan->timingfd); return ret; } diff --git a/main/rtp.c b/main/rtp.c index 0cba1a984..403e5ea0a 100644 --- a/main/rtp.c +++ b/main/rtp.c @@ -888,7 +888,7 @@ static struct ast_frame *process_cisco_dtmf(struct ast_rtp *rtp, unsigned char * event = data[3] & 0x1f; if (option_debug > 2 || rtpdebug) - ast_debug(0, "Cisco DTMF Digit: %02x (len=%d, seq=%d, flags=%02llx, power=%d, history count=%d)\n", event, len, seq, flags, power, (len - 4) / 2); + ast_debug(0, "Cisco DTMF Digit: %02x (len=%d, seq=%d, flags=%02llx, power=%d, history count=%d)\n", event, len, seq, (unsigned long long)flags, power, (len - 4) / 2); if (event < 10) { resp = '0' + event; } else if (event < 11) { 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) { diff --git a/res/res_features.c b/res/res_features.c index c01c11802..20f3d0225 100644 --- a/res/res_features.c +++ b/res/res_features.c @@ -1318,7 +1318,7 @@ static int ast_feature_interpret(struct ast_channel *chan, struct ast_channel *p ast_copy_flags(&features, &(config->features_caller), AST_FLAGS_ALL); else ast_copy_flags(&features, &(config->features_callee), AST_FLAGS_ALL); - ast_debug(3, "Feature interpret: chan=%s, peer=%s, sense=%d, features=%lld\n", chan->name, peer->name, sense, features.flags); + ast_debug(3, "Feature interpret: chan=%s, peer=%s, sense=%d, features=%lld\n", chan->name, peer->name, sense, (unsigned long long)features.flags); ast_rwlock_rdlock(&features_lock); for (x = 0; x < FEATURES_COUNT; x++) { |