mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-18 18:58:22 +00:00
fix misplaced manager event (issue #6866, flefoll)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@31127 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -6338,18 +6338,18 @@ static int handle_init_event(struct zt_pvt *i, int event)
|
|||||||
case ZT_EVENT_NOALARM:
|
case ZT_EVENT_NOALARM:
|
||||||
i->inalarm = 0;
|
i->inalarm = 0;
|
||||||
ast_log(LOG_NOTICE, "Alarm cleared on channel %d\n", i->channel);
|
ast_log(LOG_NOTICE, "Alarm cleared on channel %d\n", i->channel);
|
||||||
break;
|
|
||||||
manager_event(EVENT_FLAG_SYSTEM, "AlarmClear",
|
manager_event(EVENT_FLAG_SYSTEM, "AlarmClear",
|
||||||
"Channel: %d\r\n", i->channel);
|
"Channel: %d\r\n", i->channel);
|
||||||
|
break;
|
||||||
case ZT_EVENT_ALARM:
|
case ZT_EVENT_ALARM:
|
||||||
i->inalarm = 1;
|
i->inalarm = 1;
|
||||||
res = get_alarms(i);
|
res = get_alarms(i);
|
||||||
ast_log(LOG_WARNING, "Detected alarm on channel %d: %s\n", i->channel, alarm2str(res));
|
ast_log(LOG_WARNING, "Detected alarm on channel %d: %s\n", i->channel, alarm2str(res));
|
||||||
/* fall thru intentionally */
|
|
||||||
manager_event(EVENT_FLAG_SYSTEM, "Alarm",
|
manager_event(EVENT_FLAG_SYSTEM, "Alarm",
|
||||||
"Alarm: %s\r\n"
|
"Alarm: %s\r\n"
|
||||||
"Channel: %d\r\n",
|
"Channel: %d\r\n",
|
||||||
alarm2str(res), i->channel);
|
alarm2str(res), i->channel);
|
||||||
|
/* fall thru intentionally */
|
||||||
case ZT_EVENT_ONHOOK:
|
case ZT_EVENT_ONHOOK:
|
||||||
if (i->radio) break;
|
if (i->radio) break;
|
||||||
/* Back on hook. Hang up. */
|
/* Back on hook. Hang up. */
|
||||||
|
Reference in New Issue
Block a user