diff options
author | Gianluca Merlo <gianluca.merlo@gmail.com> | 2016-03-19 13:34:26 +0100 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2016-03-24 13:14:33 -0300 |
commit | c6e4c48e67a78940e4dd17805ba74416023365ae (patch) | |
tree | e4f1e71435c16d797eb6fcaa7aec28a2fe8050a7 /res/res_pjsip | |
parent | 7d6782cc0feb5357c6e9feb7c810f7fbe76190f0 (diff) |
config: fix flags in uint option handler
The configuration unsigned integer option handler sets flags for the
parser as if the option should be a signed integer (PARSE_INT32),
leading to errors on "out of range" values. Fix flags (PARSE_UINT32).
A fix to res_pjsip is also present which stops invalid flags from
being passed when registering sorcery object fields for qualify
status.
ASTERISK-25612 #close
Change-Id: I96b539336275e0e72a8e8033487d2c3344debd3e
Diffstat (limited to 'res/res_pjsip')
-rw-r--r-- | res/res_pjsip/pjsip_options.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/res/res_pjsip/pjsip_options.c b/res/res_pjsip/pjsip_options.c index de551dc0a..157a07741 100644 --- a/res/res_pjsip/pjsip_options.c +++ b/res/res_pjsip/pjsip_options.c @@ -1038,14 +1038,14 @@ int ast_sip_initialize_sorcery_qualify(void) snprintf(status_value_unknown, sizeof(status_value_unknown), "%u", UNKNOWN); ast_sorcery_object_field_register_nodoc(sorcery, CONTACT_STATUS, "last_status", - status_value_unknown, OPT_UINT_T, 1, FLDSET(struct ast_sip_contact_status, last_status)); + status_value_unknown, OPT_UINT_T, 0, FLDSET(struct ast_sip_contact_status, last_status)); snprintf(status_value_created, sizeof(status_value_created), "%u", CREATED); ast_sorcery_object_field_register_nodoc(sorcery, CONTACT_STATUS, "status", - status_value_created, OPT_UINT_T, 1, FLDSET(struct ast_sip_contact_status, status)); + status_value_created, OPT_UINT_T, 0, FLDSET(struct ast_sip_contact_status, status)); ast_sorcery_object_field_register_custom_nodoc(sorcery, CONTACT_STATUS, "rtt_start", "0.0", rtt_start_handler, rtt_start_to_str, NULL, 0, 0); ast_sorcery_object_field_register_nodoc(sorcery, CONTACT_STATUS, "rtt", - "0", OPT_UINT_T, 1, FLDSET(struct ast_sip_contact_status, rtt)); + "0", OPT_UINT_T, 0, FLDSET(struct ast_sip_contact_status, rtt)); return 0; } |