提交 e0961aee authored 作者: Stefan Knoblich's avatar Stefan Knoblich

ftmod_libpri: Dereference facility event correctly, add debug message.

Signed-off-by: 's avatarStefan Knoblich <s.knoblich@axsentis.de>
上级 cd951384
...@@ -1187,12 +1187,14 @@ static int handle_facility_aoc_e(const struct pri_subcmd_aoc_e *aoc_e) ...@@ -1187,12 +1187,14 @@ static int handle_facility_aoc_e(const struct pri_subcmd_aoc_e *aoc_e)
*/ */
static int on_facility(lpwrap_pri_t *spri, lpwrap_pri_event_t event_type, pri_event *pevent) static int on_facility(lpwrap_pri_t *spri, lpwrap_pri_event_t event_type, pri_event *pevent)
{ {
struct pri_event_facility *pfac = (struct pri_event_facility *)pevent; struct pri_event_facility *pfac = (struct pri_event_facility *)&pevent->facility;
int i = 0; int i = 0;
if (!pevent) if (!pevent)
return 0; return 0;
ftdm_log(FTDM_LOG_DEBUG, "Got a FACILITY event on span %d:%d\n", ftdm_span_get_id(spri->span), pfac->channel);
if (!pfac->subcmds || pfac->subcmds->counter_subcmd <= 0) if (!pfac->subcmds || pfac->subcmds->counter_subcmd <= 0)
return 0; return 0;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论