diff options
author | George Joseph <george.joseph@fairview5.com> | 2015-04-18 12:36:19 -0600 |
---|---|---|
committer | George Joseph <george.joseph@fairview5.com> | 2015-04-19 20:07:45 -0500 |
commit | 298faf7c500175307f2707897997024859c6f514 (patch) | |
tree | 015e3911e8a12c28341b8f801b489e9e610f6c12 /res/res_pjsip/location.c | |
parent | 8435a0cdff848f77ff55e709a393ea96635e5b19 (diff) |
pjsip_options: Fix non-qualified contacts showing as unavailable
The "Add qualify_timeout processing and eventing" patch introduced
an issue where contacts that had qualify_frequency set to 0 were
showing Unavailable instead Unknown. This patch checks for
qualify_frequency=0 and create an "Unknown" contact_status
with an RTT = 0.
Previously, the lack of contact_status implied Unknown but since
we're now changing endpoint state based on contact_status, I've
had to add new UNKNOWN status so that changes could trigger the
appropriate contact_status observers.
ASTERISK-24977: #close
Change-Id: Ifcbc01533ce57f0e4e584b89a395326e098b8fe7
Diffstat (limited to 'res/res_pjsip/location.c')
-rw-r--r-- | res/res_pjsip/location.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/res/res_pjsip/location.c b/res/res_pjsip/location.c index f784cb40f..21650417f 100644 --- a/res/res_pjsip/location.c +++ b/res/res_pjsip/location.c @@ -747,8 +747,8 @@ static int cli_contact_print_body(void *obj, void *arg, int flags) "Contact", flexwidth, flexwidth, wrapper->contact_id, - (status ? (status->status == AVAILABLE ? "Avail" : "Unavail") : "Unknown"), - (status ? ((long long) status->rtt) / 1000.0 : NAN)); + ast_sip_get_contact_short_status_label(status->status), + (status->status != UNKNOWN ? ((long long) status->rtt) / 1000.0 : NAN)); return 0; } |