Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#1118 closed enhancement (fixed)

Add last error code to PJSUA-LIB account info structure

Reported by: bennylp Owned by: bennylp
Priority: normal Milestone: release-1.8
Component: pjsua-lib Version: trunk
Keywords: Cc:
Backport to 1.x milestone: Backported:

Description (last modified by bennylp)

Currently, the last registration error status is represented in status field of pjsua_acc_info structure. The behavior is inconsistent, as sometimes this field contains a SIP status code, while at other times it contains pj_status_t error code. For example, when authentication fails, this filed would contain a pj_status_t value relating to authentication failure instead of the 401/407 code.

Also when the status field contains a SIP status code, it is sometimes important to know what the error code that causes the failure. For example, when sending a request fails with SIP status 503, it could be caused by resolver failure (e.g. PJLIB_UTIL_EDNSNOANSWERREC error), which in this cause it would be nice to know this information.

This ticket does the following:

  • modifies the code to consistently put SIP status code in the status field.
  • adds a new field, reg_last_err, and put any error code here.
  • clarifies this in the doxygen documentation/comment.

Change History (2)

comment:1 Changed 9 years ago by ming

  • Resolution set to fixed
  • Status changed from new to closed

(In [3303]) Fixed #1118: Add last error code to PJSUA-LIB account info structure

comment:2 Changed 9 years ago by bennylp

  • Description modified (diff)
Note: See TracTickets for help on using tickets.