diff options
author | zuul <zuul@gerrit.asterisk.org> | 2017-02-22 10:19:49 -0600 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2017-02-22 10:19:49 -0600 |
commit | 89e0bf6dddd13e8b399e7739df4bcf864fe99d55 (patch) | |
tree | 5248305e6348616465d0bd474b3c194f5874753b /pbx | |
parent | e9c8514b03d6ddcabcf16572eb77c2573c255443 (diff) | |
parent | 0654bf637cd8f1c31b82e1751d4030299e745452 (diff) |
Merge "pbx_dundi: DUNDi weight parameter not processed correctly" into 13
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 5ca8a8568..ff4fa3f30 100644 --- a/pbx/pbx_dundi.c +++ b/pbx/pbx_dundi.c @@ -994,9 +994,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", @@ -1764,9 +1764,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", |