cf: fix RTP arrows display crash

This commit is contained in:
Kaian 2016-02-15 12:20:19 +01:00
parent 2fa203779f
commit e3a64dc950
3 changed files with 6 additions and 3 deletions

View File

@ -342,7 +342,11 @@ call_flow_draw_arrow(ui_t *ui, call_flow_arrow_t *arrow, int line)
if (arrow->type == CF_ARROW_SIP) {
return call_flow_draw_message(ui, arrow, line);
} else {
return call_flow_draw_rtp_stream(ui, arrow, line);
if (setting_enabled(SETTING_CF_MEDIA)) {
return call_flow_draw_rtp_stream(ui, arrow, line);
} else {
return 0;
}
}
}

View File

@ -64,7 +64,7 @@ setting_t settings[SETTING_COUNT] = {
{ SETTING_CF_SCROLLSTEP, "cf.scrollstep", SETTING_FMT_NUMBER, "4", NULL },
{ SETTING_CF_LOCALHIGHLIGHT, "cf.localhighlight", SETTING_FMT_ENUM, SETTING_ON, SETTING_ENUM_ONOFF },
{ SETTING_CF_SDP_INFO, "cf.sdpinfo", SETTING_FMT_ENUM, SETTING_OFF, SETTING_ENUM_SDP_INFO },
{ SETTING_CF_MEDIA, "cf.media", SETTING_FMT_ENUM, SETTING_OFF, SETTING_ENUM_MEDIA },
{ SETTING_CF_MEDIA, "cf.media", SETTING_FMT_ENUM, SETTING_OFF, SETTING_ENUM_ONOFF },
{ SETTING_CF_DELTA, "cf.deltatime", SETTING_FMT_ENUM, SETTING_ON, SETTING_ENUM_ONOFF },
{ SETTING_CR_SCROLLSTEP, "cr.scrollstep", SETTING_FMT_NUMBER, "10", NULL },
{ SETTING_FILTER_METHODS, "filter.methods", SETTING_FMT_STRING, "", NULL },

View File

@ -56,7 +56,6 @@ typedef struct setting_option setting_t;
#define SETTING_ENUM_SDP_INFO (const char *[]){ "off", "first", "full", "compressed", NULL}
#define SETTING_ENUM_STORAGE (const char *[]){ "none", "memory", NULL }
#define SETTING_ENUM_HEPVERSION (const char *[]){ "2", "3", NULL }
#define SETTING_ENUM_MEDIA (const char *[]){ "on", "off", "rtcp", NULL }
//! Other useful defines
#define SETTING_ON "on"