aboutsummaryrefslogtreecommitdiffstats
path: root/pbx/pbx_dundi.c
diff options
context:
space:
mode:
authormurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-19 23:24:27 +0000
committermurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-19 23:24:27 +0000
commit77f799ff1eab72ca12a0b89f48f7b4907c44e2be (patch)
treeb7dc4ff6bdbb84391b8b226995daa5bb8fbde8b9 /pbx/pbx_dundi.c
parent5bc0b2d273087883a17b7804240030a322292279 (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: http://svn.digium.com/svn/asterisk/trunk@75983 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx/pbx_dundi.c')
-rw-r--r--pbx/pbx_dundi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/pbx/pbx_dundi.c b/pbx/pbx_dundi.c
index 472c92bd1..9f0df3a81 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 */
- uint64_t flags; /*!< Has final packet been sent */
+ unsigned int 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,8 +892,8 @@ 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), "%lld/%d/%d/%s/%s|",
- (unsigned long long)req->dr[x].flags, req->dr[x].weight, req->dr[x].techint, req->dr[x].dest,
+ snprintf(data + strlen(data), sizeof(data) - strlen(data), "%d/%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));
}
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", (unsigned long long*)&(flags.flags), &weight, &tech, &length) == 3)) {
+ while((sscanf(ptr, "%d/%d/%d/%n", &(flags.flags), &weight, &tech, &length) == 3)) {
ptr += length;
term = strchr(ptr, '|');
if (term) {