diff options
author | Matthew Jordan <mjordan@digium.com> | 2015-03-30 02:39:57 +0000 |
---|---|---|
committer | Matthew Jordan <mjordan@digium.com> | 2015-03-30 02:39:57 +0000 |
commit | ce59fabd5c01a48b8f4fcd1d7522aef9f3fbe66d (patch) | |
tree | 35b10288ab5fef312e96a9e455184072e2484ac7 /channels | |
parent | 61577cbee684c764b75322c2e4b7ff6741c9482c (diff) |
clang compiler warnings: Fix invalid enum conversion
This patch fixes some invalid enum conversion warnings caught by clang. In
particular:
* chan_sip: Several functions mixed usage of the st_refresher_param
enum and st_refresher enum. This patch corrects the functions to use the
right enum.
* chan_pjsip: Fixed mixed usage of ast_sip_session_t38state and ast_t38_state.
* strings: Fixed incorrect usage of AO2 flags with strings container.
* res_stasis: Change a return enumeration to stasis_app_user_event_res.
Review: https://reviewboard.asterisk.org/r/4535
ASTERISK-24917
Reported by: dkdegroot
patches:
rb4535.patch submitted by dkdegroot (License 6600)
........
Merged revisions 433746 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 433747 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@433748 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_pjsip.c | 2 | ||||
-rw-r--r-- | channels/chan_sip.c | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/channels/chan_pjsip.c b/channels/chan_pjsip.c index c5eb4e540..1277d559f 100644 --- a/channels/chan_pjsip.c +++ b/channels/chan_pjsip.c @@ -919,7 +919,7 @@ static int chan_pjsip_queryoption(struct ast_channel *ast, int option, void *dat struct ast_sip_channel_pvt *channel = ast_channel_tech_pvt(ast); struct ast_sip_session *session = channel->session; int res = -1; - enum ast_sip_session_t38state state = T38_STATE_UNAVAILABLE; + enum ast_t38_state state = T38_STATE_UNAVAILABLE; switch (option) { case AST_OPTION_T38_STATE: diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 97febc0f6..465345b3c 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -1492,7 +1492,7 @@ static int proc_session_timer(const void *vp); static void stop_session_timer(struct sip_pvt *p); static void start_session_timer(struct sip_pvt *p); static void restart_session_timer(struct sip_pvt *p); -static const char *strefresherparam2str(enum st_refresher r); +static const char *strefresherparam2str(enum st_refresher_param r); static int parse_session_expires(const char *p_hdrval, int *const p_interval, enum st_refresher_param *const p_ref); static int parse_minse(const char *p_hdrval, int *const p_interval); static int st_get_se(struct sip_pvt *, int max); @@ -19089,12 +19089,12 @@ static const struct _map_x_s strefreshers[] = { { -1, NULL }, }; -static const char *strefresherparam2str(enum st_refresher r) +static const char *strefresherparam2str(enum st_refresher_param r) { return map_x_s(strefresher_params, r, "Unknown"); } -static enum st_refresher str2strefresherparam(const char *s) +static enum st_refresher_param str2strefresherparam(const char *s) { return map_s_x(strefresher_params, s, -1); } @@ -21539,7 +21539,7 @@ static char *sip_show_channel(struct ast_cli_entry *e, int cmd, struct ast_cli_a ast_cli(a->fd, " S-Timer Peer Sts: %s\n", cur->stimer->st_active_peer_ua ? "Active" : "Inactive"); ast_cli(a->fd, " S-Timer Cached Min-SE: %d\n", cur->stimer->st_cached_min_se); ast_cli(a->fd, " S-Timer Cached SE: %d\n", cur->stimer->st_cached_max_se); - ast_cli(a->fd, " S-Timer Cached Ref: %s\n", strefresherparam2str(cur->stimer->st_cached_ref)); + ast_cli(a->fd, " S-Timer Cached Ref: %s\n", strefresher2str(cur->stimer->st_cached_ref)); ast_cli(a->fd, " S-Timer Cached Mode: %s\n", stmode2str(cur->stimer->st_cached_mode)); } } |