]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
freetdm: use the problem freetdm define to set wp alarms
authorMoises Silva <moy@sangoma.com>
Thu, 27 Jan 2011 21:36:45 +0000 (16:36 -0500)
committerMoises Silva <moy@sangoma.com>
Thu, 27 Jan 2011 21:36:45 +0000 (16:36 -0500)
libs/freetdm/src/ftmod/ftmod_wanpipe/ftmod_wanpipe.c
libs/freetdm/src/include/freetdm.h

index 3b384cdf3228942fdbb98e47d4d396f091ecc248..b3d1fe6355c3c268556427c8c8ed1df1e883b9d5 100644 (file)
@@ -1242,7 +1242,7 @@ static FIO_GET_ALARMS_FUNCTION(wanpipe_get_alarms)
                        /* there is a bug in wanpipe where alarms were not properly set when they should be
                         * on at application startup, until that is fixed we check the link status here too */
                        ftdm_channel_command(ftdmchan, FTDM_COMMAND_GET_LINK_STATUS, &sangoma_status);
-                       ftdmchan->alarm_flags = sangoma_status == FTDM_HW_LINK_DISCONNECTED ? 1 : 0;
+                       ftdmchan->alarm_flags = sangoma_status == FTDM_HW_LINK_DISCONNECTED ? FTDM_ALARM_RED : FTDM_ALARM_NONE;
                        ftdm_log_chan(ftdmchan, FTDM_LOG_DEBUG, "Link status is %d\n", sangoma_status);
                }
        }
index aed40541a3382aeba8ba258d0ae37e531beca8a9..588dc311b6cf20698938104c6736400558d79293 100644 (file)
@@ -838,11 +838,11 @@ typedef enum {
 /*! \brief FreeTDM supported hardware alarms. */
 typedef enum {
        FTDM_ALARM_NONE    = 0,
-       FTDM_ALARM_RED     = (1 << 1),
-       FTDM_ALARM_YELLOW  = (1 << 2),
-       FTDM_ALARM_RAI     = (1 << 3),
-       FTDM_ALARM_BLUE    = (1 << 4),
-       FTDM_ALARM_AIS     = (1 << 5),
+       FTDM_ALARM_RED     = (1 << 0),
+       FTDM_ALARM_YELLOW  = (1 << 1),
+       FTDM_ALARM_RAI     = (1 << 2),
+       FTDM_ALARM_BLUE    = (1 << 3),
+       FTDM_ALARM_AIS     = (1 << 4),
        FTDM_ALARM_GENERAL = (1 << 30)
 } ftdm_alarm_flag_t;