From cdfb9990ad122b984e00eed53e8f2f7858e3338f Mon Sep 17 00:00:00 2001 From: murf Date: Tue, 17 Jul 2007 19:40:29 +0000 Subject: via 10206, I have added an option (e) to Dial to allow the h exten to get run on peer. Had to upgrade ast_flag stuff to 64 bits to do this. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75400 f38db490-d61c-443f-a65b-d21fe96a405b --- apps/app_dial.c | 35 ++++++++++++++++++++++++++++++----- apps/app_minivm.c | 4 ++-- apps/app_mixmonitor.c | 4 ++-- apps/app_voicemail.c | 6 +++--- channels/chan_iax2.c | 8 ++++---- channels/chan_local.c | 2 +- channels/chan_sip.c | 6 +++--- channels/iax2-provision.c | 6 +++--- channels/iax2-provision.h | 2 +- funcs/func_odbc.c | 2 +- include/asterisk/abstract_jb.h | 4 ++-- include/asterisk/cdr.h | 2 +- include/asterisk/channel.h | 4 ++-- include/asterisk/chanspy.h | 2 +- include/asterisk/dundi.h | 2 +- include/asterisk/features.h | 2 +- include/asterisk/jabber.h | 4 ++-- include/asterisk/module.h | 2 +- include/asterisk/speech.h | 2 +- include/asterisk/utils.h | 6 +++--- main/channel.c | 2 +- main/loader.c | 4 ++-- main/rtp.c | 6 +++--- pbx/pbx_dundi.c | 6 +++--- res/res_features.c | 2 +- res/res_musiconhold.c | 2 +- utils/ael_main.c | 1 + utils/check_expr.c | 1 + 28 files changed, 78 insertions(+), 51 deletions(-) diff --git a/apps/app_dial.c b/apps/app_dial.c index d9b068dc7..ac97f5a32 100644 --- a/apps/app_dial.c +++ b/apps/app_dial.c @@ -109,7 +109,8 @@ static char *descrip = " party has answered, but before the call gets bridged. The 'called'\n" " DTMF string is sent to the called party, and the 'calling' DTMF\n" " string is sent to the calling party. Both parameters can be used\n" -" alone.\n" +" alone.\n" +" e - execute the 'h' extension for peer after the call ends\n" " f - Force the callerid of the *calling* channel to be set as the\n" " extension associated with the channel using a dialplan 'hint'.\n" " For example, some PSTNs do not allow CallerID to be set to anything\n" @@ -256,10 +257,11 @@ enum { OPT_IGNORE_FORWARDING = (1 << 27), OPT_CALLEE_GOSUB = (1 << 28), OPT_CANCEL_ELSEWHERE = (1 << 29), + OPT_PEER_H = (1 << 30), }; -#define DIAL_STILLGOING (1 << 30) -#define DIAL_NOFORWARDHTML (1 << 31) +#define DIAL_STILLGOING (1 << 31) +#define DIAL_NOFORWARDHTML ((uint64_t)1 << 32) /* flags are now 64 bits, so keep it up! */ enum { OPT_ARG_ANNOUNCE = 0, @@ -282,6 +284,7 @@ AST_APP_OPTIONS(dial_exec_options, { AST_APP_OPTION('c', OPT_CANCEL_ELSEWHERE), AST_APP_OPTION('d', OPT_DTMF_EXIT), AST_APP_OPTION_ARG('D', OPT_SENDDTMF, OPT_ARG_SENDDTMF), + AST_APP_OPTION('e', OPT_PEER_H), AST_APP_OPTION('f', OPT_FORCECLID), AST_APP_OPTION('g', OPT_GO_ON), AST_APP_OPTION_ARG('G', OPT_GOTO, OPT_ARG_GOTO), @@ -314,7 +317,7 @@ AST_APP_OPTIONS(dial_exec_options, { struct chanlist { struct chanlist *next; struct ast_channel *chan; - unsigned int flags; + uint64_t flags; int forwards; }; @@ -1789,7 +1792,29 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags snprintf(toast, sizeof(toast), "%ld", (long)(end_time - start_time)); pbx_builtin_setvar_helper(chan, "DIALEDTIME", toast); - + + + if (ast_test_flag(&opts, OPT_PEER_H)) { + ast_log(LOG_NOTICE,"PEER context: %s; PEER exten: %s; PEER priority: %d\n", + peer->context, peer->exten, peer->priority); + } + + strcpy(peer->context, chan->context); + + if (ast_test_flag(&opts, OPT_PEER_H) && ast_exists_extension(peer, peer->context, "h", 1, peer->cid.cid_num)) { + strcpy(peer->exten, "h"); + peer->priority = 1; + while (ast_exists_extension(peer, peer->context, peer->exten, peer->priority, peer->cid.cid_num)) { + if ((res = ast_spawn_extension(peer, peer->context, peer->exten, peer->priority, peer->cid.cid_num))) { + /* Something bad happened, or a hangup has been requested. */ + ast_debug(1, "Spawn extension (%s,%s,%d) exited non-zero on '%s'\n", peer->context, peer->exten, peer->priority, peer->name); + if (option_verbose > 1) + ast_verbose( VERBOSE_PREFIX_2 "Spawn extension (%s, %s, %d) exited non-zero on '%s'\n", peer->context, peer->exten, peer->priority, peer->name); + break; + } + peer->priority++; + } + } if (res != AST_PBX_NO_HANGUP_PEER) { if (!chan->_softhangup) chan->hangupcause = peer->hangupcause; diff --git a/apps/app_minivm.c b/apps/app_minivm.c index 2bc3da3b7..24ebd0cb9 100644 --- a/apps/app_minivm.c +++ b/apps/app_minivm.c @@ -364,7 +364,7 @@ struct minivm_account { char attachfmt[80]; /*!< Format for voicemail audio file attachment */ char etemplate[80]; /*!< Pager template */ char ptemplate[80]; /*!< Voicemail format */ - unsigned int flags; /*!< MVM_ flags */ + uint64_t flags; /*!< MVM_ flags */ struct ast_variable *chanvars; /*!< Variables for e-mail template */ double volgain; /*!< Volume gain for voicemails sent via e-mail */ AST_LIST_ENTRY(minivm_account) list; @@ -395,7 +395,7 @@ static AST_LIST_HEAD_STATIC(message_templates, minivm_template); /*! \brief Options for leaving voicemail with the voicemail() application */ struct leave_vm_options { - unsigned int flags; + uint64_t flags; signed char record_gain; }; diff --git a/apps/app_mixmonitor.c b/apps/app_mixmonitor.c index fbbde45aa..3df6676dc 100644 --- a/apps/app_mixmonitor.c +++ b/apps/app_mixmonitor.c @@ -97,7 +97,7 @@ struct mixmonitor { char *filename; char *post_process; char *name; - unsigned int flags; + uint64_t flags; }; enum { @@ -226,7 +226,7 @@ static void *mixmonitor_thread(void *obj) return NULL; } -static void launch_monitor_thread(struct ast_channel *chan, const char *filename, unsigned int flags, +static void launch_monitor_thread(struct ast_channel *chan, const char *filename, uint64_t flags, int readvol, int writevol, const char *post_process) { pthread_t thread; diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index b700e76b2..96461fce9 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -370,7 +370,7 @@ struct ast_vm_user { char uniqueid[20]; /*!< Unique integer identifier */ char exit[80]; char attachfmt[20]; /*!< Attachment format */ - unsigned int flags; /*!< VM_ flags */ + uint64_t flags; /*!< VM_ flags */ int saydurationm; int maxmsg; /*!< Maximum number of msgs per folder for this mailbox */ int maxsecs; /*!< Maximum number of seconds per message for this mailbox */ @@ -2193,7 +2193,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 %d\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, 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) { @@ -2991,7 +2991,7 @@ static void run_externnotify(char *context, char *extension) } struct leave_vm_options { - unsigned int flags; + uint64_t flags; signed char record_gain; }; diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index 2e452c389..eb804a854 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -315,7 +315,7 @@ struct iax2_user { int encmethods; int amaflags; int adsi; - unsigned int flags; + uint64_t flags; int capability; int maxauthreq; /*!< Maximum allowed outstanding AUTHREQs */ int curauthreq; /*!< Current number of outstanding AUTHREQs */ @@ -353,7 +353,7 @@ struct iax2_peer { int sockfd; /*!< Socket to use for transmission */ struct in_addr mask; int adsi; - unsigned int flags; + uint64_t flags; /* Dynamic Registration fields */ struct sockaddr_in defaddr; /*!< Default address if there is one */ @@ -604,7 +604,7 @@ struct chan_iax2_pvt { /*! Associated peer for poking */ struct iax2_peer *peerpoke; /*! IAX_ flags */ - unsigned int flags; + uint64_t flags; int adsi; /*! Transferring status */ @@ -2758,7 +2758,7 @@ static void realtime_update_peer(const char *peername, struct sockaddr_in *sin, struct create_addr_info { int capability; - unsigned int flags; + uint64_t flags; int maxtime; int encmethods; int found; diff --git a/channels/chan_local.c b/channels/chan_local.c index b4072cecc..b1bca29a6 100644 --- a/channels/chan_local.c +++ b/channels/chan_local.c @@ -104,7 +104,7 @@ static const struct ast_channel_tech local_tech = { struct local_pvt { ast_mutex_t lock; /* Channel private lock */ - unsigned int flags; /* Private flags */ + uint64_t flags; /* Private flags */ char context[AST_MAX_CONTEXT]; /* Context to call */ char exten[AST_MAX_EXTENSION]; /* Extension to call */ int reqformat; /* Requested format */ diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 18cb4aa65..b22d798ff 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -639,7 +639,7 @@ struct sip_request { int headers; /*!< # of SIP Headers */ int method; /*!< Method of this request */ int lines; /*!< Body Content */ - unsigned int flags; /*!< SIP_PKT Flags for this packet */ + uint64_t flags; /*!< SIP_PKT Flags for this packet */ char *header[SIP_MAX_HEADERS]; char *line[SIP_MAX_LINES]; char data[SIP_MAX_PACKET]; @@ -1080,7 +1080,7 @@ struct sip_pkt { int retrans; /*!< Retransmission number */ int method; /*!< SIP method for this packet */ int seqno; /*!< Sequence number */ - unsigned int flags; /*!< non-zero if this is a response packet (e.g. 200 OK) */ + uint64_t flags; /*!< non-zero if this is a response packet (e.g. 200 OK) */ struct sip_pvt *owner; /*!< Owner AST call */ int retransid; /*!< Retransmission ID */ int timer_a; /*!< SIP timer A, retransmission timer */ @@ -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: %d\n", ast_test_flag(&cur->flags[0], SIP_NEEDDESTROY)); + ast_cli(fd, " Need Destroy: %lld\n", 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/channels/iax2-provision.c b/channels/iax2-provision.c index 962e6d958..8c20ab88a 100644 --- a/channels/iax2-provision.c +++ b/channels/iax2-provision.c @@ -69,7 +69,7 @@ struct iax_template { unsigned int server; unsigned short serverport; unsigned int altserver; - unsigned int flags; + uint64_t flags; unsigned int format; unsigned int tos; } *templates; @@ -88,7 +88,7 @@ static struct iax_flag { { "disable3way", PROV_FLAG_DIS_THREEWAY }, }; -char *iax_provflags2str(char *buf, int buflen, unsigned int flags) +char *iax_provflags2str(char *buf, int buflen, uint64_t flags) { int x; @@ -117,7 +117,7 @@ static unsigned int iax_str2flags(const char *buf) int x; int len; int found; - unsigned int flags = 0; + uint64_t flags = 0; char *e; while(buf && *buf) { e = strchr(buf, ','); diff --git a/channels/iax2-provision.h b/channels/iax2-provision.h index d95150253..a54aaebfd 100644 --- a/channels/iax2-provision.h +++ b/channels/iax2-provision.h @@ -45,7 +45,7 @@ #define PROV_FLAG_DIS_CIDCW (1 << 6) /* CID/CW Disabled */ #define PROV_FLAG_DIS_THREEWAY (1 << 7) /* Three-way calling, transfer disabled */ -char *iax_provflags2str(char *buf, int buflen, unsigned int flags); +char *iax_provflags2str(char *buf, int buflen, uint64_t flags); int iax_provision_reload(void); int iax_provision_unload(void); int iax_provision_build(struct iax_ie_data *provdata, unsigned int *signature, const char *template, int force); diff --git a/funcs/func_odbc.c b/funcs/func_odbc.c index 4852a0867..10758680a 100644 --- a/funcs/func_odbc.c +++ b/funcs/func_odbc.c @@ -67,7 +67,7 @@ struct acf_odbc_query { char writehandle[5][30]; char sql_read[2048]; char sql_write[2048]; - unsigned int flags; + uint64_t flags; int rowlimit; struct ast_custom_function *acf; }; diff --git a/include/asterisk/abstract_jb.h b/include/asterisk/abstract_jb.h index 145256fcf..37ff5b9d3 100644 --- a/include/asterisk/abstract_jb.h +++ b/include/asterisk/abstract_jb.h @@ -55,7 +55,7 @@ enum { struct ast_jb_conf { /*! \brief Combination of the AST_JB_ENABLED, AST_JB_FORCED and AST_JB_LOG flags. */ - unsigned int flags; + uint64_t flags; /*! \brief Max size of the jitterbuffer implementation. */ long max_size; /*! \brief Resynchronization threshold of the jitterbuffer implementation. */ @@ -98,7 +98,7 @@ struct ast_jb /*! \brief File for frame timestamp tracing. */ FILE *logfile; /*! \brief Jitterbuffer internal state flags. */ - unsigned int flags; + uint64_t flags; }; diff --git a/include/asterisk/cdr.h b/include/asterisk/cdr.h index cdbf35e09..f8d4b5d8d 100644 --- a/include/asterisk/cdr.h +++ b/include/asterisk/cdr.h @@ -83,7 +83,7 @@ struct ast_cdr { /*! What account number to use */ char accountcode[AST_MAX_ACCOUNT_CODE]; /*! flags */ - unsigned int flags; + uint64_t flags; /*! Unique Channel Identifier */ char uniqueid[32]; /*! User field */ diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h index 9bfc3dd4d..0a5b7c1a0 100644 --- a/include/asterisk/channel.h +++ b/include/asterisk/channel.h @@ -468,7 +468,7 @@ struct ast_channel { (see \ref AstChanVar ) */ ast_group_t callgroup; /*!< Call group for call pickups */ ast_group_t pickupgroup; /*!< Pickup group - which calls groups can be picked up? */ - unsigned int flags; /*!< channel flags of AST_FLAG_ type */ + uint64_t flags; /*!< channel flags of AST_FLAG_ type */ unsigned short transfercapability; /*!< ISDN Transfer Capbility - AST_FLAG_DIGITAL is not enough */ AST_LIST_HEAD_NOLOCK(, ast_frame) readq; int alertpipe[2]; @@ -567,7 +567,7 @@ struct ast_bridge_config { const char *end_sound; const char *start_sound; int firstpass; - unsigned int flags; + uint64_t flags; }; struct chanmon; diff --git a/include/asterisk/chanspy.h b/include/asterisk/chanspy.h index 8550210d0..f8a979dd5 100644 --- a/include/asterisk/chanspy.h +++ b/include/asterisk/chanspy.h @@ -61,7 +61,7 @@ struct ast_channel_spy { struct ast_channel *chan; struct ast_channel_spy_queue read_queue; struct ast_channel_spy_queue write_queue; - unsigned int flags; + uint64_t flags; enum chanspy_states status; const char *type; /* The volume adjustment values are very straightforward: diff --git a/include/asterisk/dundi.h b/include/asterisk/dundi.h index e588338ae..bc64576ef 100644 --- a/include/asterisk/dundi.h +++ b/include/asterisk/dundi.h @@ -192,7 +192,7 @@ struct dundi_peer_status { #define DEFAULT_MAXMS 2000 struct dundi_result { - unsigned int flags; + uint64_t flags; int weight; int expiration; int techint; diff --git a/include/asterisk/features.h b/include/asterisk/features.h index 5e9d5f3d2..c59acca16 100644 --- a/include/asterisk/features.h +++ b/include/asterisk/features.h @@ -39,7 +39,7 @@ struct ast_call_feature { char exten[FEATURE_MAX_LEN]; char default_exten[FEATURE_MAX_LEN]; int (*operation)(struct ast_channel *chan, struct ast_channel *peer, struct ast_bridge_config *config, char *code, int sense); - unsigned int flags; + uint64_t flags; char app[FEATURE_APP_LEN]; char app_args[FEATURE_APP_ARGS_LEN]; char moh_class[FEATURE_MOH_LEN]; diff --git a/include/asterisk/jabber.h b/include/asterisk/jabber.h index 53c3fbed5..028d0bc3a 100644 --- a/include/asterisk/jabber.h +++ b/include/asterisk/jabber.h @@ -102,7 +102,7 @@ struct aji_buddy { char channel[160]; struct aji_resource *resources; enum aji_btype btype; - unsigned int flags; + uint64_t flags; }; struct aji_buddy_container { @@ -137,7 +137,7 @@ struct aji_client { int timeout; int message_timeout; int authorized; - unsigned int flags; + uint64_t flags; int component; /* 0 client, 1 component */ struct aji_buddy_container buddies; AST_LIST_HEAD(messages,aji_message) messages; diff --git a/include/asterisk/module.h b/include/asterisk/module.h index d53e6086c..d75e2d4fc 100644 --- a/include/asterisk/module.h +++ b/include/asterisk/module.h @@ -215,7 +215,7 @@ struct ast_module_info { */ const char *key; - unsigned int flags; + uint64_t flags; }; void ast_module_register(const struct ast_module_info *); diff --git a/include/asterisk/speech.h b/include/asterisk/speech.h index 02d056f33..b3b853bf2 100644 --- a/include/asterisk/speech.h +++ b/include/asterisk/speech.h @@ -51,7 +51,7 @@ struct ast_speech { /*! Structure lock */ ast_mutex_t lock; /*! Set flags */ - unsigned int flags; + uint64_t flags; /*! Processing sound (used when engine is processing audio and getting results) */ char *processing_sound; /*! Current state of structure */ diff --git a/include/asterisk/utils.h b/include/asterisk/utils.h index 76f90c7b0..e87157f2f 100644 --- a/include/asterisk/utils.h +++ b/include/asterisk/utils.h @@ -50,7 +50,7 @@ your variable. The flag macros below use a set of compiler tricks to verify - that the caller is using an "unsigned int" variable to hold + that the caller is using an "unsigned long long" variable to hold the flags, and nothing else. If the caller uses any other type of variable, a warning message similar to this: @@ -64,7 +64,7 @@ \endverbatim */ -extern unsigned int __unsigned_int_flags_dummy; +extern uint64_t __unsigned_int_flags_dummy; #define ast_test_flag(p,flag) ({ \ typeof ((p)->flags) __p = (p)->flags; \ @@ -146,7 +146,7 @@ extern unsigned int __unsigned_int_flags_dummy; /*! \brief Structure used to handle boolean flags */ struct ast_flags { - unsigned int flags; + uint64_t flags; }; struct ast_hostent { diff --git a/main/channel.c b/main/channel.c index 105dc030e..be1b293fa 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=%d 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", ast_opt_internal_timing, chan->timingfd); return ret; } diff --git a/main/loader.c b/main/loader.c index 5f29fc6b9..20227b59e 100644 --- a/main/loader.c +++ b/main/loader.c @@ -86,8 +86,8 @@ struct ast_module { int usecount; /* the number of 'users' currently in this module */ struct module_user_list users; /* the list of users in the module */ struct { - unsigned int running:1; - unsigned int declined:1; + uint64_t running:1; + uint64_t declined:1; } flags; AST_LIST_ENTRY(ast_module) entry; char resource[0]; diff --git a/main/rtp.c b/main/rtp.c index 8aa86a613..0cba1a984 100644 --- a/main/rtp.c +++ b/main/rtp.c @@ -152,7 +152,7 @@ struct ast_rtp { int send_payload; int send_duration; int nat; - unsigned int flags; + uint64_t flags; struct sockaddr_in us; /*!< Socket representation of the local endpoint. */ struct sockaddr_in them; /*!< Socket representation of the remote endpoint. */ struct timeval rxcore; @@ -845,7 +845,7 @@ static struct ast_frame *process_cisco_dtmf(struct ast_rtp *rtp, unsigned char * char resp = 0; struct ast_frame *f = NULL; unsigned char seq; - unsigned int flags; + uint64_t flags; unsigned int power; /* We should have at least 4 bytes in RTP data */ @@ -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=%02x, 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, 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 e63f90397..b21b17ec9 100644 --- a/pbx/pbx_dundi.c +++ b/pbx/pbx_dundi.c @@ -179,7 +179,7 @@ struct dundi_transaction { dundi_eid them_eid; /*!< Their EID, to us */ ast_aes_encrypt_key ecx; /*!< AES 128 Encryption context */ ast_aes_decrypt_key dcx; /*!< AES 128 Decryption context */ - unsigned int flags; /*!< Has final packet been sent */ + uint64_t flags; /*!< Has final packet been sent */ int ttl; /*!< Remaining TTL for queries on this one */ int thread; /*!< We have a calling thread */ int retranstimer; /*!< How long to wait before retransmissions */ @@ -892,7 +892,7 @@ static int cache_save(dundi_eid *eidpeer, struct dundi_request *req, int start, /* Skip anything with an illegal pipe in it */ if (strchr(req->dr[x].dest, '|')) continue; - snprintf(data + strlen(data), sizeof(data) - strlen(data), "%d/%d/%d/%s/%s|", + 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, dundi_eid_to_str_short(eidpeer_str, sizeof(eidpeer_str), &req->dr[x].eid)); } @@ -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, "%d/%d/%d/%n", &(flags.flags), &weight, &tech, &length) == 3)) { + while((sscanf(ptr, "%lld/%d/%d/%n", &(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 3f71bfadf..c01c11802 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=%d\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, features.flags); ast_rwlock_rdlock(&features_lock); for (x = 0; x < FEATURES_COUNT; x++) { diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c index 84a44f3b7..ce0eb8a1e 100644 --- a/res/res_musiconhold.c +++ b/res/res_musiconhold.c @@ -138,7 +138,7 @@ struct mohclass { int allowed_files; /*! The current number of files loaded into the filearray */ int total_files; - unsigned int flags; + uint64_t flags; /*! The format from the MOH source, not applicable to "files" mode */ int format; /*! The pid of the external application delivering MOH */ diff --git a/utils/ael_main.c b/utils/ael_main.c index 9cd0bfd08..df8a01c37 100644 --- a/utils/ael_main.c +++ b/utils/ael_main.c @@ -9,6 +9,7 @@ #include #include +#include "asterisk/compat.h" #include "asterisk/ast_expr.h" #include "asterisk/channel.h" #include "asterisk/module.h" diff --git a/utils/check_expr.c b/utils/check_expr.c index 7f0378b16..f64147242 100644 --- a/utils/check_expr.c +++ b/utils/check_expr.c @@ -21,6 +21,7 @@ #include #include #include +#include <../include/asterisk/compat.h> #include <../include/asterisk/ast_expr.h> static int global_lineno = 1; -- cgit v1.2.3