[asterisk-commits] murf: trunk r75400 - in /trunk: apps/ channels/ funcs/ include/asterisk/ main...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jul 17 14:40:30 CDT 2007


Author: murf
Date: Tue Jul 17 14:40:29 2007
New Revision: 75400

URL: http://svn.digium.com/view/asterisk?view=rev&rev=75400
Log:
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.

Modified:
    trunk/apps/app_dial.c
    trunk/apps/app_minivm.c
    trunk/apps/app_mixmonitor.c
    trunk/apps/app_voicemail.c
    trunk/channels/chan_iax2.c
    trunk/channels/chan_local.c
    trunk/channels/chan_sip.c
    trunk/channels/iax2-provision.c
    trunk/channels/iax2-provision.h
    trunk/funcs/func_odbc.c
    trunk/include/asterisk/abstract_jb.h
    trunk/include/asterisk/cdr.h
    trunk/include/asterisk/channel.h
    trunk/include/asterisk/chanspy.h
    trunk/include/asterisk/dundi.h
    trunk/include/asterisk/features.h
    trunk/include/asterisk/jabber.h
    trunk/include/asterisk/module.h
    trunk/include/asterisk/speech.h
    trunk/include/asterisk/utils.h
    trunk/main/channel.c
    trunk/main/loader.c
    trunk/main/rtp.c
    trunk/pbx/pbx_dundi.c
    trunk/res/res_features.c
    trunk/res/res_musiconhold.c
    trunk/utils/ael_main.c
    trunk/utils/check_expr.c

Modified: trunk/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_dial.c?view=diff&rev=75400&r1=75399&r2=75400
==============================================================================
--- trunk/apps/app_dial.c (original)
+++ trunk/apps/app_dial.c Tue Jul 17 14:40:29 2007
@@ -109,7 +109,8 @@
 "           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 @@
 	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_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 @@
 struct chanlist {
 	struct chanlist *next;
 	struct ast_channel *chan;
-	unsigned int flags;
+	uint64_t flags;
 	int forwards;
 };
 
@@ -1789,7 +1792,29 @@
 
 		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;

Modified: trunk/apps/app_minivm.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_minivm.c?view=diff&rev=75400&r1=75399&r2=75400
==============================================================================
--- trunk/apps/app_minivm.c (original)
+++ trunk/apps/app_minivm.c Tue Jul 17 14:40:29 2007
@@ -364,7 +364,7 @@
 	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 @@
 
 /*! \brief Options for leaving voicemail with the voicemail() application */
 struct leave_vm_options {
-	unsigned int flags;
+	uint64_t flags;
 	signed char record_gain;
 };
 

Modified: trunk/apps/app_mixmonitor.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_mixmonitor.c?view=diff&rev=75400&r1=75399&r2=75400
==============================================================================
--- trunk/apps/app_mixmonitor.c (original)
+++ trunk/apps/app_mixmonitor.c Tue Jul 17 14:40:29 2007
@@ -97,7 +97,7 @@
 	char *filename;
 	char *post_process;
 	char *name;
-	unsigned int flags;
+	uint64_t flags;
 };
 
 enum {
@@ -226,7 +226,7 @@
 	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;

Modified: trunk/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_voicemail.c?view=diff&rev=75400&r1=75399&r2=75400
==============================================================================
--- trunk/apps/app_voicemail.c (original)
+++ trunk/apps/app_voicemail.c Tue Jul 17 14:40:29 2007
@@ -370,7 +370,7 @@
 	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 @@
 	}
 	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 @@
 }
 
 struct leave_vm_options {
-	unsigned int flags;
+	uint64_t flags;
 	signed char record_gain;
 };
 

Modified: trunk/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_iax2.c?view=diff&rev=75400&r1=75399&r2=75400
==============================================================================
--- trunk/channels/chan_iax2.c (original)
+++ trunk/channels/chan_iax2.c Tue Jul 17 14:40:29 2007
@@ -315,7 +315,7 @@
 	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 @@
 	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 @@
 	/*! Associated peer for poking */
 	struct iax2_peer *peerpoke;
 	/*! IAX_ flags */
-	unsigned int flags;
+	uint64_t flags;
 	int adsi;
 
 	/*! Transferring status */
@@ -2758,7 +2758,7 @@
 
 struct create_addr_info {
 	int capability;
-	unsigned int flags;
+	uint64_t flags;
 	int maxtime;
 	int encmethods;
 	int found;

Modified: trunk/channels/chan_local.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_local.c?view=diff&rev=75400&r1=75399&r2=75400
==============================================================================
--- trunk/channels/chan_local.c (original)
+++ trunk/channels/chan_local.c Tue Jul 17 14:40:29 2007
@@ -104,7 +104,7 @@
 
 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 */

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=75400&r1=75399&r2=75400
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Tue Jul 17 14:40:29 2007
@@ -639,7 +639,7 @@
 	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 @@
 	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 @@
 				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");

Modified: trunk/channels/iax2-provision.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/iax2-provision.c?view=diff&rev=75400&r1=75399&r2=75400
==============================================================================
--- trunk/channels/iax2-provision.c (original)
+++ trunk/channels/iax2-provision.c Tue Jul 17 14:40:29 2007
@@ -69,7 +69,7 @@
 	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 @@
 	{ "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 @@
 	int x;
 	int len;
 	int found;
-	unsigned int flags = 0;
+	uint64_t flags = 0;
 	char *e;
 	while(buf && *buf) {
 		e = strchr(buf, ',');

Modified: trunk/channels/iax2-provision.h
URL: http://svn.digium.com/view/asterisk/trunk/channels/iax2-provision.h?view=diff&rev=75400&r1=75399&r2=75400
==============================================================================
--- trunk/channels/iax2-provision.h (original)
+++ trunk/channels/iax2-provision.h Tue Jul 17 14:40:29 2007
@@ -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);

Modified: trunk/funcs/func_odbc.c
URL: http://svn.digium.com/view/asterisk/trunk/funcs/func_odbc.c?view=diff&rev=75400&r1=75399&r2=75400
==============================================================================
--- trunk/funcs/func_odbc.c (original)
+++ trunk/funcs/func_odbc.c Tue Jul 17 14:40:29 2007
@@ -67,7 +67,7 @@
 	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;
 };

Modified: trunk/include/asterisk/abstract_jb.h
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/abstract_jb.h?view=diff&rev=75400&r1=75399&r2=75400
==============================================================================
--- trunk/include/asterisk/abstract_jb.h (original)
+++ trunk/include/asterisk/abstract_jb.h Tue Jul 17 14:40:29 2007
@@ -55,7 +55,7 @@
 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 @@
 	/*! \brief File for frame timestamp tracing. */
 	FILE *logfile;
 	/*! \brief Jitterbuffer internal state flags. */
-	unsigned int flags;
+	uint64_t flags;
 };
 
 

Modified: trunk/include/asterisk/cdr.h
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/cdr.h?view=diff&rev=75400&r1=75399&r2=75400
==============================================================================
--- trunk/include/asterisk/cdr.h (original)
+++ trunk/include/asterisk/cdr.h Tue Jul 17 14:40:29 2007
@@ -83,7 +83,7 @@
 	/*! 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 */

Modified: trunk/include/asterisk/channel.h
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/channel.h?view=diff&rev=75400&r1=75399&r2=75400
==============================================================================
--- trunk/include/asterisk/channel.h (original)
+++ trunk/include/asterisk/channel.h Tue Jul 17 14:40:29 2007
@@ -468,7 +468,7 @@
 								(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 @@
 	const char *end_sound;
 	const char *start_sound;
 	int firstpass;
-	unsigned int flags;
+	uint64_t flags;
 };
 
 struct chanmon;

Modified: trunk/include/asterisk/chanspy.h
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/chanspy.h?view=diff&rev=75400&r1=75399&r2=75400
==============================================================================
--- trunk/include/asterisk/chanspy.h (original)
+++ trunk/include/asterisk/chanspy.h Tue Jul 17 14:40:29 2007
@@ -61,7 +61,7 @@
 	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:

Modified: trunk/include/asterisk/dundi.h
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/dundi.h?view=diff&rev=75400&r1=75399&r2=75400
==============================================================================
--- trunk/include/asterisk/dundi.h (original)
+++ trunk/include/asterisk/dundi.h Tue Jul 17 14:40:29 2007
@@ -192,7 +192,7 @@
 #define DEFAULT_MAXMS			2000
 
 struct dundi_result {
-	unsigned int flags;
+	uint64_t flags;
 	int weight;
 	int expiration;
 	int techint;

Modified: trunk/include/asterisk/features.h
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/features.h?view=diff&rev=75400&r1=75399&r2=75400
==============================================================================
--- trunk/include/asterisk/features.h (original)
+++ trunk/include/asterisk/features.h Tue Jul 17 14:40:29 2007
@@ -39,7 +39,7 @@
 	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];

Modified: trunk/include/asterisk/jabber.h
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/jabber.h?view=diff&rev=75400&r1=75399&r2=75400
==============================================================================
--- trunk/include/asterisk/jabber.h (original)
+++ trunk/include/asterisk/jabber.h Tue Jul 17 14:40:29 2007
@@ -102,7 +102,7 @@
 	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 @@
 	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;

Modified: trunk/include/asterisk/module.h
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/module.h?view=diff&rev=75400&r1=75399&r2=75400
==============================================================================
--- trunk/include/asterisk/module.h (original)
+++ trunk/include/asterisk/module.h Tue Jul 17 14:40:29 2007
@@ -215,7 +215,7 @@
 	 */
 
 	const char *key;
-	unsigned int flags;
+	uint64_t flags;
 };
 
 void ast_module_register(const struct ast_module_info *);

Modified: trunk/include/asterisk/speech.h
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/speech.h?view=diff&rev=75400&r1=75399&r2=75400
==============================================================================
--- trunk/include/asterisk/speech.h (original)
+++ trunk/include/asterisk/speech.h Tue Jul 17 14:40:29 2007
@@ -51,7 +51,7 @@
 	/*! 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 */

Modified: trunk/include/asterisk/utils.h
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/utils.h?view=diff&rev=75400&r1=75399&r2=75400
==============================================================================
--- trunk/include/asterisk/utils.h (original)
+++ trunk/include/asterisk/utils.h Tue Jul 17 14:40:29 2007
@@ -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 @@
 /*! \brief Structure used to handle boolean flags 
 */
 struct ast_flags {
-	unsigned int flags;
+	uint64_t flags;
 };
 
 struct ast_hostent {

Modified: trunk/main/channel.c
URL: http://svn.digium.com/view/asterisk/trunk/main/channel.c?view=diff&rev=75400&r1=75399&r2=75400
==============================================================================
--- trunk/main/channel.c (original)
+++ trunk/main/channel.c Tue Jul 17 14:40:29 2007
@@ -2454,7 +2454,7 @@
 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;
 }
 

Modified: trunk/main/loader.c
URL: http://svn.digium.com/view/asterisk/trunk/main/loader.c?view=diff&rev=75400&r1=75399&r2=75400
==============================================================================
--- trunk/main/loader.c (original)
+++ trunk/main/loader.c Tue Jul 17 14:40:29 2007
@@ -86,8 +86,8 @@
 	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];

Modified: trunk/main/rtp.c
URL: http://svn.digium.com/view/asterisk/trunk/main/rtp.c?view=diff&rev=75400&r1=75399&r2=75400
==============================================================================
--- trunk/main/rtp.c (original)
+++ trunk/main/rtp.c Tue Jul 17 14:40:29 2007
@@ -152,7 +152,7 @@
 	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 @@
 	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 @@
 	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) {

Modified: trunk/pbx/pbx_dundi.c
URL: http://svn.digium.com/view/asterisk/trunk/pbx/pbx_dundi.c?view=diff&rev=75400&r1=75399&r2=75400
==============================================================================
--- trunk/pbx/pbx_dundi.c (original)
+++ trunk/pbx/pbx_dundi.c Tue Jul 17 14:40:29 2007
@@ -179,7 +179,7 @@
 	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 @@
 		/* 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 @@
 				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) {

Modified: trunk/res/res_features.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_features.c?view=diff&rev=75400&r1=75399&r2=75400
==============================================================================
--- trunk/res/res_features.c (original)
+++ trunk/res/res_features.c Tue Jul 17 14:40:29 2007
@@ -1318,7 +1318,7 @@
 		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++) {

Modified: trunk/res/res_musiconhold.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_musiconhold.c?view=diff&rev=75400&r1=75399&r2=75400
==============================================================================
--- trunk/res/res_musiconhold.c (original)
+++ trunk/res/res_musiconhold.c Tue Jul 17 14:40:29 2007
@@ -138,7 +138,7 @@
 	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 */

Modified: trunk/utils/ael_main.c
URL: http://svn.digium.com/view/asterisk/trunk/utils/ael_main.c?view=diff&rev=75400&r1=75399&r2=75400
==============================================================================
--- trunk/utils/ael_main.c (original)
+++ trunk/utils/ael_main.c Tue Jul 17 14:40:29 2007
@@ -9,6 +9,7 @@
 #include <regex.h>
 #include <limits.h>
 
+#include "asterisk/compat.h"
 #include "asterisk/ast_expr.h"
 #include "asterisk/channel.h"
 #include "asterisk/module.h"

Modified: trunk/utils/check_expr.c
URL: http://svn.digium.com/view/asterisk/trunk/utils/check_expr.c?view=diff&rev=75400&r1=75399&r2=75400
==============================================================================
--- trunk/utils/check_expr.c (original)
+++ trunk/utils/check_expr.c Tue Jul 17 14:40:29 2007
@@ -21,6 +21,7 @@
 #include <stdarg.h>
 #include <string.h>
 #include <stdlib.h>
+#include <../include/asterisk/compat.h>
 #include <../include/asterisk/ast_expr.h>
 
 static int global_lineno = 1;




More information about the asterisk-commits mailing list