diff options
author | zuul <zuul@gerrit.asterisk.org> | 2017-02-22 10:19:45 -0600 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2017-02-22 10:19:45 -0600 |
commit | afcdadcd19a118d97bfaab38c14117bd2ff6fd0b (patch) | |
tree | 3bcb11fd27dd053df0c707dd908290cea48ff7bc /pbx | |
parent | 02356d36f782b1078ea7009a445dff60aef4aa0e (diff) | |
parent | fc70ca9499c26329950f044838209c6bade3f54c (diff) |
Merge "pbx_dundi: DUNDi weight parameter not processed correctly"
Diffstat (limited to 'pbx')
-rw-r--r-- | pbx/pbx_dundi.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pbx/pbx_dundi.c b/pbx/pbx_dundi.c index 50a91605e..58086aa81 100644 --- a/pbx/pbx_dundi.c +++ b/pbx/pbx_dundi.c @@ -992,9 +992,9 @@ static int dundi_prop_precache(struct dundi_transaction *trans, struct dundi_ies sizeof(trans->parent->dr[trans->parent->respcount].tech)); trans->parent->respcount++; ast_clear_flag_nonstd(trans->parent->hmd, DUNDI_HINT_DONT_ASK); - } else if (trans->parent->dr[z].weight > ies->answers[x]->weight) { + } else if (trans->parent->dr[z].weight > ntohs(ies->answers[x]->weight)) { /* Update weight if appropriate */ - trans->parent->dr[z].weight = ies->answers[x]->weight; + trans->parent->dr[z].weight = ntohs(ies->answers[x]->weight); } } else ast_log(LOG_NOTICE, "Dropping excessive answers in precache for %s@%s\n", @@ -1762,9 +1762,9 @@ static int handle_command_response(struct dundi_transaction *trans, struct dundi sizeof(trans->parent->dr[trans->parent->respcount].tech)); trans->parent->respcount++; ast_clear_flag_nonstd(trans->parent->hmd, DUNDI_HINT_DONT_ASK); - } else if (trans->parent->dr[z].weight > ies.answers[x]->weight) { + } else if (trans->parent->dr[z].weight > ntohs(ies.answers[x]->weight)) { /* Update weight if appropriate */ - trans->parent->dr[z].weight = ies.answers[x]->weight; + trans->parent->dr[z].weight = ntohs(ies.answers[x]->weight); } } else ast_log(LOG_NOTICE, "Dropping excessive answers to request for %s@%s\n", |