summaryrefslogtreecommitdiff
path: root/xpp/zap_debug.h
diff options
context:
space:
mode:
authortzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2008-01-10 18:12:27 +0000
committertzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2008-01-10 18:12:27 +0000
commit9899bafe997a4e020f302c99a6e025b4e8b25191 (patch)
tree8a108b05d0f319c95ba83f1d5984ae261572bebf /xpp/zap_debug.h
parent1d7d5b07325a186785b22abf09ff531dfc2edd54 (diff)
xpp.r5254:
* Improved polarity reversal hangups in FXO (r5194). Fixed false detection of polarity reversals. * Optimize xframe allocation, by not zeroing the whole memory (in get_xframe()). * Fixed erronous error message that appeared sometimes from fpga_load during USB renumeration. * Zaptel::Chans now provides battery() reporting for some FXO channels (Astribank FXO and wcfxo). git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@3643 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'xpp/zap_debug.h')
-rw-r--r--xpp/zap_debug.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/xpp/zap_debug.h b/xpp/zap_debug.h
index ae5ee40..fb1ecc3 100644
--- a/xpp/zap_debug.h
+++ b/xpp/zap_debug.h
@@ -170,4 +170,21 @@ static inline char *sig2str(int sig)
return "Unconfigured";
}
+static inline char *alarmbit2str(int alarmbit)
+{
+ /* from zaptel.h */
+ switch(1 << alarmbit) {
+ case ZT_ALARM_NONE: return "NONE";
+ case ZT_ALARM_RECOVER: return "RECOVER";
+ case ZT_ALARM_LOOPBACK: return "LOOPBACK";
+ case ZT_ALARM_YELLOW: return "YELLOW";
+ case ZT_ALARM_RED: return "RED";
+ case ZT_ALARM_BLUE: return "BLUE";
+ case ZT_ALARM_NOTOPEN: return "NOTOPEN";
+ }
+ return "UNKNOWN";
+}
+
+void alarm2str(int alarm, char *buf, int buflen);
+
#endif /* ZAP_DEBUG_H */