summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorSteve Murphy <murf@digium.com>2007-07-19 23:24:27 +0000
committerSteve Murphy <murf@digium.com>2007-07-19 23:24:27 +0000
commit0e969271ae14e976b873327bd721eba24947545a (patch)
treeb7dc4ff6bdbb84391b8b226995daa5bb8fbde8b9 /channels
parent7756ba661904d1147e42ce884d3ebb2f128233b5 (diff)
After some study, thought, comparing, etc. I've backed out the previous universal mod to make ast_flags a 64 bit thing. Instead, I added a 64-bit version of ast_flags (ast_flags64), and 64-bit versions of the test-flag, set-flag, etc. macros, and an app_parse_options64 routine, and I use these in app_dial alone, to eliminate the 30-option limit it had grown to meet. There is room now for 32 more options and flags. I was heavily tempted to implement some of the other ideas that were presented, but this solution does not intro any new versions of dial, doesn't have a different API, has a minimal/zero impact on code outside of dial, and doesn't seriously (I hope) affect the code structure of dial. It's the best I can think of right now. My goal was NOT to rewrite dial. I leave that to a future, coordinated effort.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75983 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_iax2.c8
-rw-r--r--channels/chan_local.c2
-rw-r--r--channels/chan_sip.c6
-rw-r--r--channels/iax2-provision.c6
-rw-r--r--channels/iax2-provision.h2
5 files changed, 12 insertions, 12 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index 23ef72958..05c23067d 100644
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -315,7 +315,7 @@ struct iax2_user {
int encmethods;
int amaflags;
int adsi;
- uint64_t flags;
+ unsigned int 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;
- uint64_t flags;
+ unsigned int 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 */
- uint64_t flags;
+ unsigned int flags;
int adsi;
/*! Transferring status */
@@ -2807,7 +2807,7 @@ static void realtime_update_peer(const char *peername, struct sockaddr_in *sin,
struct create_addr_info {
int capability;
- uint64_t flags;
+ unsigned int flags;
int maxtime;
int encmethods;
int found;
diff --git a/channels/chan_local.c b/channels/chan_local.c
index b1bca29a6..b4072cecc 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 */
- uint64_t flags; /* Private flags */
+ unsigned int 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 f35fa4687..b0b7bda15 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 */
- uint64_t flags; /*!< SIP_PKT Flags for this packet */
+ unsigned int 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 */
- uint64_t flags; /*!< non-zero if this is a response packet (e.g. 200 OK) */
+ unsigned int 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 */
@@ -11584,7 +11584,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", (unsigned long long)ast_test_flag(&cur->flags[0], SIP_NEEDDESTROY));
+ ast_cli(fd, " Need Destroy: %d\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 8c20ab88a..962e6d958 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;
- uint64_t flags;
+ unsigned int 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, uint64_t flags)
+char *iax_provflags2str(char *buf, int buflen, unsigned int flags)
{
int x;
@@ -117,7 +117,7 @@ static unsigned int iax_str2flags(const char *buf)
int x;
int len;
int found;
- uint64_t flags = 0;
+ unsigned int flags = 0;
char *e;
while(buf && *buf) {
e = strchr(buf, ',');
diff --git a/channels/iax2-provision.h b/channels/iax2-provision.h
index a54aaebfd..d95150253 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, uint64_t flags);
+char *iax_provflags2str(char *buf, int buflen, unsigned int 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);