freetdm: Add ftdm_channel_get_state(), ftdm_channel_get_last_state() and ftdm_span_get_trunk_type_str().

Remove custom versions from ftmod_isdn and ftmod_libpri.

Signed-off-by: Stefan Knoblich <s.knoblich@axsentis.de>
This commit is contained in:
Stefan Knoblich committed 2010-11-14 17:48:09 +01:00
1 parent 4f4aee4f07
commit e17201bbac
4 files changed
+32 -32

No files matched your search

@@ -34,30 +34,16 @@
#include "private/ftdm_core.h"
#include "ftmod_libpri.h"
/***
* Move to core
***/
#ifndef ARRAY_SIZE
#define ARRAY_SIZE(x) (sizeof((x)) / sizeof((x)[0]))
#endif
static ftdm_channel_state_t ftdm_channel_get_state(const ftdm_channel_t *chan)
{
assert(chan);
return chan->state;
}
static void _ftdm_channel_set_state_force(ftdm_channel_t *chan, const ftdm_channel_state_t state)
{
assert(chan);
chan->state = state;
}
static const char *ftdm_span_get_trunk_type_str(const ftdm_span_t *span)
{
return ftdm_trunk_type2str(span->trunk_type);
}
/**
* \brief Unloads libpri IO module
* \return Success