mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-04 03:20:33 +00:00
build against the now-typedef-free dahdi/user.h
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@134254 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -102,7 +102,7 @@ static int careful_write(int fd, unsigned char *data, int len)
|
|||||||
static int conf_run(struct ast_channel *chan, int confno, int confflags)
|
static int conf_run(struct ast_channel *chan, int confno, int confflags)
|
||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
DAHDI_CONFINFO ztc;
|
struct dahdi_confinfo ztc;
|
||||||
struct ast_frame *f;
|
struct ast_frame *f;
|
||||||
struct ast_channel *c;
|
struct ast_channel *c;
|
||||||
struct ast_frame fr;
|
struct ast_frame fr;
|
||||||
@@ -114,8 +114,7 @@ static int conf_run(struct ast_channel *chan, int confno, int confflags)
|
|||||||
int retryzap;
|
int retryzap;
|
||||||
int origfd;
|
int origfd;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
struct dahdi_bufferinfo bi;
|
||||||
DAHDI_BUFFERINFO bi;
|
|
||||||
char __buf[CONF_SIZE + AST_FRIENDLY_OFFSET];
|
char __buf[CONF_SIZE + AST_FRIENDLY_OFFSET];
|
||||||
char *buf = __buf + AST_FRIENDLY_OFFSET;
|
char *buf = __buf + AST_FRIENDLY_OFFSET;
|
||||||
|
|
||||||
|
@@ -156,7 +156,7 @@ static void run_ras(struct ast_channel *chan, char *args)
|
|||||||
int status;
|
int status;
|
||||||
int res;
|
int res;
|
||||||
int signalled = 0;
|
int signalled = 0;
|
||||||
DAHDI_BUFFERINFO savebi;
|
struct dahdi_bufferinfo savebi;
|
||||||
int x;
|
int x;
|
||||||
|
|
||||||
res = ioctl(chan->fds[0], DAHDI_GET_BUFINFO, &savebi);
|
res = ioctl(chan->fds[0], DAHDI_GET_BUFINFO, &savebi);
|
||||||
@@ -214,7 +214,7 @@ static int exec(struct ast_channel *chan, void *data)
|
|||||||
int res=-1;
|
int res=-1;
|
||||||
char *args;
|
char *args;
|
||||||
struct ast_module_user *u;
|
struct ast_module_user *u;
|
||||||
DAHDI_PARAMS ztp;
|
struct dahdi_params ztp;
|
||||||
|
|
||||||
if (!data)
|
if (!data)
|
||||||
data = "";
|
data = "";
|
||||||
|
@@ -101,7 +101,7 @@ static int careful_write(int fd, unsigned char *data, int len)
|
|||||||
static int conf_run(struct ast_channel *chan, int confno, int confflags)
|
static int conf_run(struct ast_channel *chan, int confno, int confflags)
|
||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
DAHDI_CONFINFO ztc;
|
struct dahdi_confinfo ztc;
|
||||||
struct ast_frame *f;
|
struct ast_frame *f;
|
||||||
struct ast_channel *c;
|
struct ast_channel *c;
|
||||||
struct ast_frame fr;
|
struct ast_frame fr;
|
||||||
@@ -115,8 +115,7 @@ static int conf_run(struct ast_channel *chan, int confno, int confflags)
|
|||||||
int ret = -1;
|
int ret = -1;
|
||||||
char input[4];
|
char input[4];
|
||||||
int ic=0;
|
int ic=0;
|
||||||
|
struct dahdi_bufferinfo bi;
|
||||||
DAHDI_BUFFERINFO bi;
|
|
||||||
char __buf[CONF_SIZE + AST_FRIENDLY_OFFSET];
|
char __buf[CONF_SIZE + AST_FRIENDLY_OFFSET];
|
||||||
char *buf = __buf + AST_FRIENDLY_OFFSET;
|
char *buf = __buf + AST_FRIENDLY_OFFSET;
|
||||||
|
|
||||||
|
@@ -84,7 +84,7 @@ static int flash_exec(struct ast_channel *chan, void *data)
|
|||||||
int res = -1;
|
int res = -1;
|
||||||
int x;
|
int x;
|
||||||
struct ast_module_user *u;
|
struct ast_module_user *u;
|
||||||
DAHDI_PARAMS ztp;
|
struct dahdi_params ztp;
|
||||||
u = ast_module_user_add(chan);
|
u = ast_module_user_add(chan);
|
||||||
if (!strcasecmp(chan->tech->type, dahdi_chan_name)) {
|
if (!strcasecmp(chan->tech->type, dahdi_chan_name)) {
|
||||||
memset(&ztp, 0, sizeof(ztp));
|
memset(&ztp, 0, sizeof(ztp));
|
||||||
|
@@ -742,7 +742,7 @@ static void conf_play(struct ast_channel *chan, struct ast_conference *conf, enu
|
|||||||
static struct ast_conference *build_conf(char *confno, char *pin, char *pinadmin, int make, int dynamic, int refcount)
|
static struct ast_conference *build_conf(char *confno, char *pin, char *pinadmin, int make, int dynamic, int refcount)
|
||||||
{
|
{
|
||||||
struct ast_conference *cnf;
|
struct ast_conference *cnf;
|
||||||
DAHDI_CONFINFO ztc = { 0, };
|
struct dahdi_confinfo ztc = { 0, };
|
||||||
int confno_int = 0;
|
int confno_int = 0;
|
||||||
|
|
||||||
AST_LIST_LOCK(&confs);
|
AST_LIST_LOCK(&confs);
|
||||||
@@ -1373,7 +1373,7 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c
|
|||||||
struct ast_conf_user *user = NULL;
|
struct ast_conf_user *user = NULL;
|
||||||
struct ast_conf_user *usr = NULL;
|
struct ast_conf_user *usr = NULL;
|
||||||
int fd;
|
int fd;
|
||||||
DAHDI_CONFINFO ztc, ztc_empty;
|
struct dahdi_confinfo ztc, ztc_empty;
|
||||||
struct ast_frame *f;
|
struct ast_frame *f;
|
||||||
struct ast_channel *c;
|
struct ast_channel *c;
|
||||||
struct ast_frame fr;
|
struct ast_frame fr;
|
||||||
@@ -1406,7 +1406,7 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c
|
|||||||
char members[10] = "";
|
char members[10] = "";
|
||||||
int dtmf, opt_waitmarked_timeout = 0;
|
int dtmf, opt_waitmarked_timeout = 0;
|
||||||
time_t timeout = 0;
|
time_t timeout = 0;
|
||||||
DAHDI_BUFFERINFO bi;
|
struct dahdi_bufferinfo bi;
|
||||||
char __buf[CONF_SIZE + AST_FRIENDLY_OFFSET];
|
char __buf[CONF_SIZE + AST_FRIENDLY_OFFSET];
|
||||||
char *buf = __buf + AST_FRIENDLY_OFFSET;
|
char *buf = __buf + AST_FRIENDLY_OFFSET;
|
||||||
int setusercount = 0;
|
int setusercount = 0;
|
||||||
|
@@ -398,7 +398,7 @@ struct dahdi_subchannel {
|
|||||||
unsigned int needunhold:1;
|
unsigned int needunhold:1;
|
||||||
unsigned int linear:1;
|
unsigned int linear:1;
|
||||||
unsigned int inthreeway:1;
|
unsigned int inthreeway:1;
|
||||||
DAHDI_CONFINFO curconf;
|
struct dahdi_confinfo curconf;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define CONF_USER_REAL (1 << 0)
|
#define CONF_USER_REAL (1 << 0)
|
||||||
@@ -413,7 +413,7 @@ static struct dahdi_pvt {
|
|||||||
|
|
||||||
struct dahdi_subchannel sub_unused; /*!< Just a safety precaution */
|
struct dahdi_subchannel sub_unused; /*!< Just a safety precaution */
|
||||||
struct dahdi_subchannel subs[3]; /*!< Sub-channels */
|
struct dahdi_subchannel subs[3]; /*!< Sub-channels */
|
||||||
DAHDI_CONFINFO saveconf; /*!< Saved conference info */
|
struct dahdi_confinfo saveconf; /*!< Saved conference info */
|
||||||
|
|
||||||
struct dahdi_pvt *slaves[MAX_SLAVES]; /*!< Slave to us (follows our conferencing) */
|
struct dahdi_pvt *slaves[MAX_SLAVES]; /*!< Slave to us (follows our conferencing) */
|
||||||
struct dahdi_pvt *master; /*!< Master to us (we follow their conferencing) */
|
struct dahdi_pvt *master; /*!< Master to us (we follow their conferencing) */
|
||||||
@@ -543,7 +543,7 @@ static struct dahdi_pvt {
|
|||||||
struct timeval flashtime; /*!< Last flash-hook time */
|
struct timeval flashtime; /*!< Last flash-hook time */
|
||||||
struct ast_dsp *dsp;
|
struct ast_dsp *dsp;
|
||||||
int cref; /*!< Call reference number */
|
int cref; /*!< Call reference number */
|
||||||
DAHDI_DIAL_OPERATION dop;
|
struct dahdi_dialoperation dop;
|
||||||
int whichwink; /*!< SIG_FEATDMF_TA Which wink are we on? */
|
int whichwink; /*!< SIG_FEATDMF_TA Which wink are we on? */
|
||||||
char finaldial[64];
|
char finaldial[64];
|
||||||
char accountcode[AST_MAX_ACCOUNT_CODE]; /*!< Account code */
|
char accountcode[AST_MAX_ACCOUNT_CODE]; /*!< Account code */
|
||||||
@@ -589,7 +589,7 @@ struct dahdi_chan_conf {
|
|||||||
#ifdef HAVE_PRI
|
#ifdef HAVE_PRI
|
||||||
struct dahdi_pri pri;
|
struct dahdi_pri pri;
|
||||||
#endif
|
#endif
|
||||||
DAHDI_PARAMS timing;
|
struct dahdi_params timing;
|
||||||
|
|
||||||
char smdi_port[SMDI_MAX_FILENAME_LEN];
|
char smdi_port[SMDI_MAX_FILENAME_LEN];
|
||||||
};
|
};
|
||||||
@@ -952,7 +952,7 @@ static int dahdi_setlinear(int dfd, int linear)
|
|||||||
|
|
||||||
static int alloc_sub(struct dahdi_pvt *p, int x)
|
static int alloc_sub(struct dahdi_pvt *p, int x)
|
||||||
{
|
{
|
||||||
DAHDI_BUFFERINFO bi;
|
struct dahdi_bufferinfo bi;
|
||||||
int res;
|
int res;
|
||||||
if (p->subs[x].dfd < 0) {
|
if (p->subs[x].dfd < 0) {
|
||||||
#ifdef HAVE_ZAPTEL
|
#ifdef HAVE_ZAPTEL
|
||||||
@@ -1063,7 +1063,7 @@ static int dahdi_digit_begin(struct ast_channel *chan, char digit)
|
|||||||
|
|
||||||
if (pvt->pulse || ioctl(pvt->subs[SUB_REAL].dfd, DAHDI_SENDTONE, &dtmf)) {
|
if (pvt->pulse || ioctl(pvt->subs[SUB_REAL].dfd, DAHDI_SENDTONE, &dtmf)) {
|
||||||
int res;
|
int res;
|
||||||
DAHDI_DIAL_OPERATION zo = {
|
struct dahdi_dialoperation zo = {
|
||||||
.op = DAHDI_DIAL_OP_APPEND,
|
.op = DAHDI_DIAL_OP_APPEND,
|
||||||
.dialstr[0] = 'T',
|
.dialstr[0] = 'T',
|
||||||
.dialstr[1] = digit,
|
.dialstr[1] = digit,
|
||||||
@@ -1251,7 +1251,7 @@ static int conf_add(struct dahdi_pvt *p, struct dahdi_subchannel *c, int index,
|
|||||||
{
|
{
|
||||||
/* If the conference already exists, and we're already in it
|
/* If the conference already exists, and we're already in it
|
||||||
don't bother doing anything */
|
don't bother doing anything */
|
||||||
DAHDI_CONFINFO zi;
|
struct dahdi_confinfo zi;
|
||||||
|
|
||||||
memset(&zi, 0, sizeof(zi));
|
memset(&zi, 0, sizeof(zi));
|
||||||
zi.chan = 0;
|
zi.chan = 0;
|
||||||
@@ -1298,7 +1298,7 @@ static int isourconf(struct dahdi_pvt *p, struct dahdi_subchannel *c)
|
|||||||
|
|
||||||
static int conf_del(struct dahdi_pvt *p, struct dahdi_subchannel *c, int index)
|
static int conf_del(struct dahdi_pvt *p, struct dahdi_subchannel *c, int index)
|
||||||
{
|
{
|
||||||
DAHDI_CONFINFO zi;
|
struct dahdi_confinfo zi;
|
||||||
if (/* Can't delete if there's no dfd */
|
if (/* Can't delete if there's no dfd */
|
||||||
(c->dfd < 0) ||
|
(c->dfd < 0) ||
|
||||||
/* Don't delete from the conference if it's not our conference */
|
/* Don't delete from the conference if it's not our conference */
|
||||||
@@ -1364,7 +1364,7 @@ static int isslavenative(struct dahdi_pvt *p, struct dahdi_pvt **out)
|
|||||||
|
|
||||||
static int reset_conf(struct dahdi_pvt *p)
|
static int reset_conf(struct dahdi_pvt *p)
|
||||||
{
|
{
|
||||||
DAHDI_CONFINFO zi;
|
struct dahdi_confinfo zi;
|
||||||
memset(&zi, 0, sizeof(zi));
|
memset(&zi, 0, sizeof(zi));
|
||||||
p->confno = -1;
|
p->confno = -1;
|
||||||
memset(&p->subs[SUB_REAL].curconf, 0, sizeof(p->subs[SUB_REAL].curconf));
|
memset(&p->subs[SUB_REAL].curconf, 0, sizeof(p->subs[SUB_REAL].curconf));
|
||||||
@@ -1497,7 +1497,7 @@ static void dahdi_disable_ec(struct dahdi_pvt *p)
|
|||||||
p->echocanon = 0;
|
p->echocanon = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void fill_txgain(DAHDI_GAINS *g, float gain, int law)
|
static void fill_txgain(struct dahdi_gains *g, float gain, int law)
|
||||||
{
|
{
|
||||||
int j;
|
int j;
|
||||||
int k;
|
int k;
|
||||||
@@ -1531,7 +1531,7 @@ static void fill_txgain(DAHDI_GAINS *g, float gain, int law)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void fill_rxgain(DAHDI_GAINS *g, float gain, int law)
|
static void fill_rxgain(struct dahdi_gains *g, float gain, int law)
|
||||||
{
|
{
|
||||||
int j;
|
int j;
|
||||||
int k;
|
int k;
|
||||||
@@ -1567,7 +1567,7 @@ static void fill_rxgain(DAHDI_GAINS *g, float gain, int law)
|
|||||||
|
|
||||||
static int set_actual_txgain(int fd, int chan, float gain, int law)
|
static int set_actual_txgain(int fd, int chan, float gain, int law)
|
||||||
{
|
{
|
||||||
DAHDI_GAINS g;
|
struct dahdi_gains g;
|
||||||
int res;
|
int res;
|
||||||
|
|
||||||
memset(&g, 0, sizeof(g));
|
memset(&g, 0, sizeof(g));
|
||||||
@@ -1586,7 +1586,7 @@ static int set_actual_txgain(int fd, int chan, float gain, int law)
|
|||||||
|
|
||||||
static int set_actual_rxgain(int fd, int chan, float gain, int law)
|
static int set_actual_rxgain(int fd, int chan, float gain, int law)
|
||||||
{
|
{
|
||||||
DAHDI_GAINS g;
|
struct dahdi_gains g;
|
||||||
int res;
|
int res;
|
||||||
|
|
||||||
memset(&g, 0, sizeof(g));
|
memset(&g, 0, sizeof(g));
|
||||||
@@ -1668,7 +1668,7 @@ static inline int dahdi_confmute(struct dahdi_pvt *p, int muted)
|
|||||||
|
|
||||||
static int save_conference(struct dahdi_pvt *p)
|
static int save_conference(struct dahdi_pvt *p)
|
||||||
{
|
{
|
||||||
DAHDI_CONFINFO c;
|
struct dahdi_confinfo c;
|
||||||
int res;
|
int res;
|
||||||
if (p->saveconf.confmode) {
|
if (p->saveconf.confmode) {
|
||||||
ast_log(LOG_WARNING, "Can't save conference -- already in use\n");
|
ast_log(LOG_WARNING, "Can't save conference -- already in use\n");
|
||||||
@@ -2444,7 +2444,7 @@ static int dahdi_hangup(struct ast_channel *ast)
|
|||||||
struct dahdi_pvt *p = ast->tech_pvt;
|
struct dahdi_pvt *p = ast->tech_pvt;
|
||||||
struct dahdi_pvt *tmp = NULL;
|
struct dahdi_pvt *tmp = NULL;
|
||||||
struct dahdi_pvt *prev = NULL;
|
struct dahdi_pvt *prev = NULL;
|
||||||
DAHDI_PARAMS par;
|
struct dahdi_params par;
|
||||||
|
|
||||||
if (option_debug)
|
if (option_debug)
|
||||||
ast_log(LOG_DEBUG, "dahdi_hangup(%s)\n", ast->name);
|
ast_log(LOG_DEBUG, "dahdi_hangup(%s)\n", ast->name);
|
||||||
@@ -3572,7 +3572,7 @@ static int attempt_transfer(struct dahdi_pvt *p)
|
|||||||
|
|
||||||
static int check_for_conference(struct dahdi_pvt *p)
|
static int check_for_conference(struct dahdi_pvt *p)
|
||||||
{
|
{
|
||||||
DAHDI_CONFINFO ci;
|
struct dahdi_confinfo ci;
|
||||||
/* Fine if we already have a master, etc */
|
/* Fine if we already have a master, etc */
|
||||||
if (p->master || (p->confno > -1))
|
if (p->master || (p->confno > -1))
|
||||||
return 0;
|
return 0;
|
||||||
@@ -3595,7 +3595,7 @@ static int check_for_conference(struct dahdi_pvt *p)
|
|||||||
static int get_alarms(struct dahdi_pvt *p)
|
static int get_alarms(struct dahdi_pvt *p)
|
||||||
{
|
{
|
||||||
int res;
|
int res;
|
||||||
DAHDI_SPANINFO zi;
|
struct dahdi_spaninfo zi;
|
||||||
memset(&zi, 0, sizeof(zi));
|
memset(&zi, 0, sizeof(zi));
|
||||||
zi.spanno = p->span;
|
zi.spanno = p->span;
|
||||||
res = ioctl(p->subs[SUB_REAL].dfd, DAHDI_SPANSTAT, &zi);
|
res = ioctl(p->subs[SUB_REAL].dfd, DAHDI_SPANSTAT, &zi);
|
||||||
@@ -4194,7 +4194,7 @@ static struct ast_frame *dahdi_handle_event(struct ast_channel *ast)
|
|||||||
if (p->oprmode < 0) break;
|
if (p->oprmode < 0) break;
|
||||||
if (p->oprmode > 1)
|
if (p->oprmode > 1)
|
||||||
{
|
{
|
||||||
DAHDI_PARAMS par;
|
struct dahdi_params par;
|
||||||
|
|
||||||
if (ioctl(p->oprpeer->subs[SUB_REAL].dfd, DAHDI_GET_PARAMS, &par) != -1)
|
if (ioctl(p->oprpeer->subs[SUB_REAL].dfd, DAHDI_GET_PARAMS, &par) != -1)
|
||||||
{
|
{
|
||||||
@@ -4691,7 +4691,7 @@ static struct ast_frame *dahdi_read(struct ast_channel *ast)
|
|||||||
/* make sure it sends initial key state as first frame */
|
/* make sure it sends initial key state as first frame */
|
||||||
if ((p->radio || (p->oprmode < 0)) && (!p->firstradio))
|
if ((p->radio || (p->oprmode < 0)) && (!p->firstradio))
|
||||||
{
|
{
|
||||||
DAHDI_PARAMS ps;
|
struct dahdi_params ps;
|
||||||
|
|
||||||
ps.channo = p->channel;
|
ps.channo = p->channel;
|
||||||
if (ioctl(p->subs[SUB_REAL].dfd, DAHDI_GET_PARAMS, &ps) < 0) {
|
if (ioctl(p->subs[SUB_REAL].dfd, DAHDI_GET_PARAMS, &ps) < 0) {
|
||||||
@@ -5233,7 +5233,7 @@ static struct ast_channel *dahdi_new(struct dahdi_pvt *i, int state, int startpb
|
|||||||
int x,y;
|
int x,y;
|
||||||
int features;
|
int features;
|
||||||
char *b2 = NULL;
|
char *b2 = NULL;
|
||||||
DAHDI_PARAMS ps;
|
struct dahdi_params ps;
|
||||||
char chanprefix[*dahdi_chan_name_len + 4];
|
char chanprefix[*dahdi_chan_name_len + 4];
|
||||||
|
|
||||||
if (i->subs[index].owner) {
|
if (i->subs[index].owner) {
|
||||||
@@ -7051,7 +7051,7 @@ static int restart_monitor(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_PRI
|
#ifdef HAVE_PRI
|
||||||
static int pri_resolve_span(int *span, int channel, int offset, DAHDI_SPANINFO *si)
|
static int pri_resolve_span(int *span, int channel, int offset, struct dahdi_spaninfo *si)
|
||||||
{
|
{
|
||||||
int x;
|
int x;
|
||||||
int trunkgroup;
|
int trunkgroup;
|
||||||
@@ -7099,8 +7099,8 @@ static int pri_resolve_span(int *span, int channel, int offset, DAHDI_SPANINFO *
|
|||||||
|
|
||||||
static int pri_create_trunkgroup(int trunkgroup, int *channels)
|
static int pri_create_trunkgroup(int trunkgroup, int *channels)
|
||||||
{
|
{
|
||||||
DAHDI_SPANINFO si;
|
struct dahdi_spaninfo si;
|
||||||
DAHDI_PARAMS p;
|
struct dahdi_params p;
|
||||||
int fd;
|
int fd;
|
||||||
int span;
|
int span;
|
||||||
int ospan=0;
|
int ospan=0;
|
||||||
@@ -7183,7 +7183,7 @@ static struct dahdi_pvt *mkintf(int channel, const struct dahdi_chan_conf *conf,
|
|||||||
struct dahdi_pvt *tmp = NULL, *tmp2, *prev = NULL;
|
struct dahdi_pvt *tmp = NULL, *tmp2, *prev = NULL;
|
||||||
char fn[80];
|
char fn[80];
|
||||||
#if 1
|
#if 1
|
||||||
DAHDI_BUFFERINFO bi;
|
struct dahdi_bufferinfo bi;
|
||||||
#endif
|
#endif
|
||||||
int res;
|
int res;
|
||||||
int span=0;
|
int span=0;
|
||||||
@@ -7191,7 +7191,7 @@ static struct dahdi_pvt *mkintf(int channel, const struct dahdi_chan_conf *conf,
|
|||||||
int x;
|
int x;
|
||||||
struct dahdi_pvt **wlist;
|
struct dahdi_pvt **wlist;
|
||||||
struct dahdi_pvt **wend;
|
struct dahdi_pvt **wend;
|
||||||
DAHDI_PARAMS p;
|
struct dahdi_params p;
|
||||||
|
|
||||||
wlist = &iflist;
|
wlist = &iflist;
|
||||||
wend = &ifend;
|
wend = &ifend;
|
||||||
@@ -7287,7 +7287,7 @@ static struct dahdi_pvt *mkintf(int channel, const struct dahdi_chan_conf *conf,
|
|||||||
destroy_dahdi_pvt(&tmp);
|
destroy_dahdi_pvt(&tmp);
|
||||||
return NULL;
|
return NULL;
|
||||||
} else {
|
} else {
|
||||||
DAHDI_SPANINFO si;
|
struct dahdi_spaninfo si;
|
||||||
si.spanno = 0;
|
si.spanno = 0;
|
||||||
if (ioctl(tmp->subs[SUB_REAL].dfd,DAHDI_SPANSTAT,&si) == -1) {
|
if (ioctl(tmp->subs[SUB_REAL].dfd,DAHDI_SPANSTAT,&si) == -1) {
|
||||||
ast_log(LOG_ERROR, "Unable to get span status: %s\n", strerror(errno));
|
ast_log(LOG_ERROR, "Unable to get span status: %s\n", strerror(errno));
|
||||||
@@ -7664,7 +7664,7 @@ static struct dahdi_pvt *mkintf(int channel, const struct dahdi_chan_conf *conf,
|
|||||||
static inline int available(struct dahdi_pvt *p, int channelmatch, ast_group_t groupmatch, int *busy, int *channelmatched, int *groupmatched)
|
static inline int available(struct dahdi_pvt *p, int channelmatch, ast_group_t groupmatch, int *busy, int *channelmatched, int *groupmatched)
|
||||||
{
|
{
|
||||||
int res;
|
int res;
|
||||||
DAHDI_PARAMS par;
|
struct dahdi_params par;
|
||||||
|
|
||||||
/* First, check group matching */
|
/* First, check group matching */
|
||||||
if (groupmatch) {
|
if (groupmatch) {
|
||||||
@@ -7768,7 +7768,7 @@ static inline int available(struct dahdi_pvt *p, int channelmatch, ast_group_t g
|
|||||||
static struct dahdi_pvt *chandup(struct dahdi_pvt *src)
|
static struct dahdi_pvt *chandup(struct dahdi_pvt *src)
|
||||||
{
|
{
|
||||||
struct dahdi_pvt *p;
|
struct dahdi_pvt *p;
|
||||||
DAHDI_BUFFERINFO bi;
|
struct dahdi_bufferinfo bi;
|
||||||
int res;
|
int res;
|
||||||
|
|
||||||
if ((p = ast_malloc(sizeof(*p)))) {
|
if ((p = ast_malloc(sizeof(*p)))) {
|
||||||
@@ -8075,7 +8075,7 @@ static int pri_find_principle(struct dahdi_pri *pri, int channel)
|
|||||||
int x;
|
int x;
|
||||||
int span = PRI_SPAN(channel);
|
int span = PRI_SPAN(channel);
|
||||||
int spanfd;
|
int spanfd;
|
||||||
DAHDI_PARAMS param;
|
struct dahdi_params param;
|
||||||
int principle = -1;
|
int principle = -1;
|
||||||
int explicit = PRI_EXPLICIT(channel);
|
int explicit = PRI_EXPLICIT(channel);
|
||||||
channel = PRI_CHANNEL(channel);
|
channel = PRI_CHANNEL(channel);
|
||||||
@@ -9506,9 +9506,9 @@ static void *pri_dchannel(void *vpri)
|
|||||||
static int start_pri(struct dahdi_pri *pri)
|
static int start_pri(struct dahdi_pri *pri)
|
||||||
{
|
{
|
||||||
int res, x;
|
int res, x;
|
||||||
DAHDI_PARAMS p;
|
struct dahdi_params p;
|
||||||
DAHDI_BUFFERINFO bi;
|
struct dahdi_bufferinfo bi;
|
||||||
DAHDI_SPANINFO si;
|
struct dahdi_spaninfo si;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < NUM_DCHANS; i++) {
|
for (i = 0; i < NUM_DCHANS; i++) {
|
||||||
@@ -10027,8 +10027,8 @@ static int dahdi_show_channel(int fd, int argc, char **argv)
|
|||||||
{
|
{
|
||||||
int channel;
|
int channel;
|
||||||
struct dahdi_pvt *tmp = NULL;
|
struct dahdi_pvt *tmp = NULL;
|
||||||
DAHDI_CONFINFO ci;
|
struct dahdi_confinfo ci;
|
||||||
DAHDI_PARAMS ps;
|
struct dahdi_params ps;
|
||||||
int x;
|
int x;
|
||||||
ast_mutex_t *lock;
|
ast_mutex_t *lock;
|
||||||
struct dahdi_pvt *start;
|
struct dahdi_pvt *start;
|
||||||
@@ -10193,7 +10193,7 @@ static int dahdi_show_status(int fd, int argc, char *argv[]) {
|
|||||||
char alarms[50];
|
char alarms[50];
|
||||||
|
|
||||||
int ctl;
|
int ctl;
|
||||||
DAHDI_SPANINFO s;
|
struct dahdi_spaninfo s;
|
||||||
|
|
||||||
#ifdef HAVE_ZAPTEL
|
#ifdef HAVE_ZAPTEL
|
||||||
if ((ctl = open("/dev/zap/ctl", O_RDWR)) < 0) {
|
if ((ctl = open("/dev/zap/ctl", O_RDWR)) < 0) {
|
||||||
@@ -11385,7 +11385,7 @@ static int process_dahdi(struct dahdi_chan_conf *confp, const char *cat, struct
|
|||||||
int toneduration;
|
int toneduration;
|
||||||
int ctlfd;
|
int ctlfd;
|
||||||
int res;
|
int res;
|
||||||
DAHDI_DIAL_PARAMS dps;
|
struct dahdi_dialparams dps;
|
||||||
|
|
||||||
#ifdef HAVE_ZAPTEL
|
#ifdef HAVE_ZAPTEL
|
||||||
ctlfd = open("/dev/zap/ctl", O_RDWR);
|
ctlfd = open("/dev/zap/ctl", O_RDWR);
|
||||||
|
@@ -114,7 +114,7 @@ struct pvt {
|
|||||||
int totalms;
|
int totalms;
|
||||||
int lasttotalms;
|
int lasttotalms;
|
||||||
#endif
|
#endif
|
||||||
DAHDI_TRANSCODE_HEADER *hdr;
|
struct dahdi_transcode_header *hdr;
|
||||||
};
|
};
|
||||||
|
|
||||||
static int transcoder_show(int fd, int argc, char **argv)
|
static int transcoder_show(int fd, int argc, char **argv)
|
||||||
@@ -134,7 +134,7 @@ static int transcoder_show(int fd, int argc, char **argv)
|
|||||||
static int zap_framein(struct ast_trans_pvt *pvt, struct ast_frame *f)
|
static int zap_framein(struct ast_trans_pvt *pvt, struct ast_frame *f)
|
||||||
{
|
{
|
||||||
struct pvt *ztp = pvt->pvt;
|
struct pvt *ztp = pvt->pvt;
|
||||||
DAHDI_TRANSCODE_HEADER *hdr = ztp->hdr;
|
struct dahdi_transcode_header *hdr = ztp->hdr;
|
||||||
|
|
||||||
if (!f->subclass) {
|
if (!f->subclass) {
|
||||||
/* Fake a return frame for calculation purposes */
|
/* Fake a return frame for calculation purposes */
|
||||||
@@ -181,7 +181,7 @@ static int zap_framein(struct ast_trans_pvt *pvt, struct ast_frame *f)
|
|||||||
static struct ast_frame *zap_frameout(struct ast_trans_pvt *pvt)
|
static struct ast_frame *zap_frameout(struct ast_trans_pvt *pvt)
|
||||||
{
|
{
|
||||||
struct pvt *ztp = pvt->pvt;
|
struct pvt *ztp = pvt->pvt;
|
||||||
DAHDI_TRANSCODE_HEADER *hdr = ztp->hdr;
|
struct dahdi_transcode_header *hdr = ztp->hdr;
|
||||||
unsigned int x;
|
unsigned int x;
|
||||||
|
|
||||||
if (ztp->fake == 2) {
|
if (ztp->fake == 2) {
|
||||||
@@ -260,7 +260,7 @@ static int zap_translate(struct ast_trans_pvt *pvt, int dest, int source)
|
|||||||
int fd;
|
int fd;
|
||||||
unsigned int x = DAHDI_TCOP_ALLOCATE;
|
unsigned int x = DAHDI_TCOP_ALLOCATE;
|
||||||
struct pvt *ztp = pvt->pvt;
|
struct pvt *ztp = pvt->pvt;
|
||||||
DAHDI_TRANSCODE_HEADER *hdr;
|
struct dahdi_transcode_header *hdr;
|
||||||
int flags;
|
int flags;
|
||||||
|
|
||||||
if ((fd = open("/dev/zap/transcode", O_RDWR)) < 0)
|
if ((fd = open("/dev/zap/transcode", O_RDWR)) < 0)
|
||||||
@@ -442,7 +442,7 @@ static void build_translators(struct format_map *map, unsigned int dstfmts, unsi
|
|||||||
|
|
||||||
static int find_transcoders(void)
|
static int find_transcoders(void)
|
||||||
{
|
{
|
||||||
DAHDI_TRANSCODE_INFO info = { 0, };
|
struct dahdi_transcode_info info = { 0, };
|
||||||
struct format_map map = { { { 0 } } };
|
struct format_map map = { { { 0 } } };
|
||||||
int fd, res;
|
int fd, res;
|
||||||
unsigned int x, y;
|
unsigned int x, y;
|
||||||
|
@@ -42,7 +42,7 @@
|
|||||||
#define DAHDI_ALARM_RED ZT_ALARM_RED
|
#define DAHDI_ALARM_RED ZT_ALARM_RED
|
||||||
#define DAHDI_ALARM_YELLOW ZT_ALARM_YELLOW
|
#define DAHDI_ALARM_YELLOW ZT_ALARM_YELLOW
|
||||||
#define DAHDI_AUDIOMODE ZT_AUDIOMODE
|
#define DAHDI_AUDIOMODE ZT_AUDIOMODE
|
||||||
#define DAHDI_BUFFERINFO ZT_BUFFERINFO
|
#define dahdi_bufferinfo zt_bufferinfo
|
||||||
#define DAHDI_CHANNO ZT_CHANNO
|
#define DAHDI_CHANNO ZT_CHANNO
|
||||||
#define DAHDI_CHECK_HOOKSTATE ZT_CHECK_HOOKSTATE
|
#define DAHDI_CHECK_HOOKSTATE ZT_CHECK_HOOKSTATE
|
||||||
#define DAHDI_CONF_CONF ZT_CONF_CONF
|
#define DAHDI_CONF_CONF ZT_CONF_CONF
|
||||||
@@ -58,15 +58,15 @@
|
|||||||
#define DAHDI_CONF_REALANDPSEUDO ZT_CONF_REALANDPSEUDO
|
#define DAHDI_CONF_REALANDPSEUDO ZT_CONF_REALANDPSEUDO
|
||||||
#define DAHDI_CONF_TALKER ZT_CONF_TALKER
|
#define DAHDI_CONF_TALKER ZT_CONF_TALKER
|
||||||
#define DAHDI_CONFDIAG ZT_CONFDIAG
|
#define DAHDI_CONFDIAG ZT_CONFDIAG
|
||||||
#define DAHDI_CONFINFO ZT_CONFINFO
|
#define dahdi_confinfo zt_confinfo
|
||||||
#define DAHDI_CONFMUTE ZT_CONFMUTE
|
#define DAHDI_CONFMUTE ZT_CONFMUTE
|
||||||
#define DAHDI_DEFAULT_NUM_BUFS ZT_DEFAULT_NUM_BUFS
|
#define DAHDI_DEFAULT_NUM_BUFS ZT_DEFAULT_NUM_BUFS
|
||||||
#define DAHDI_DIAL ZT_DIAL
|
#define DAHDI_DIAL ZT_DIAL
|
||||||
#define DAHDI_DIALING ZT_DIALING
|
#define DAHDI_DIALING ZT_DIALING
|
||||||
#define DAHDI_DIAL_OP_APPEND ZT_DIAL_OP_APPEND
|
#define DAHDI_DIAL_OP_APPEND ZT_DIAL_OP_APPEND
|
||||||
#define DAHDI_DIAL_OPERATION ZT_DIAL_OPERATION
|
#define dahdi_dialoperation zt_dialoperation
|
||||||
#define DAHDI_DIAL_OP_REPLACE ZT_DIAL_OP_REPLACE
|
#define DAHDI_DIAL_OP_REPLACE ZT_DIAL_OP_REPLACE
|
||||||
#define DAHDI_DIAL_PARAMS ZT_DIAL_PARAMS
|
#define dahdi_dialparams zt_dialparams
|
||||||
#define DAHDI_ECHOCANCEL ZT_ECHOCANCEL
|
#define DAHDI_ECHOCANCEL ZT_ECHOCANCEL
|
||||||
#define DAHDI_ECHOTRAIN ZT_ECHOTRAIN
|
#define DAHDI_ECHOTRAIN ZT_ECHOTRAIN
|
||||||
#define DAHDI_EVENT_ALARM ZT_EVENT_ALARM
|
#define DAHDI_EVENT_ALARM ZT_EVENT_ALARM
|
||||||
@@ -96,7 +96,7 @@
|
|||||||
#define DAHDI_FLUSH_BOTH ZT_FLUSH_BOTH
|
#define DAHDI_FLUSH_BOTH ZT_FLUSH_BOTH
|
||||||
#define DAHDI_FLUSH_READ ZT_FLUSH_READ
|
#define DAHDI_FLUSH_READ ZT_FLUSH_READ
|
||||||
#define DAHDI_FLUSH_WRITE ZT_FLUSH_WRITE
|
#define DAHDI_FLUSH_WRITE ZT_FLUSH_WRITE
|
||||||
#define DAHDI_GAINS ZT_GAINS
|
#define dahdi_gains zt_gains
|
||||||
#define DAHDI_GET_BUFINFO ZT_GET_BUFINFO
|
#define DAHDI_GET_BUFINFO ZT_GET_BUFINFO
|
||||||
#define DAHDI_GETCONF ZT_GETCONF
|
#define DAHDI_GETCONF ZT_GETCONF
|
||||||
#define DAHDI_GETCONFMUTE ZT_GETCONFMUTE
|
#define DAHDI_GETCONFMUTE ZT_GETCONFMUTE
|
||||||
@@ -116,7 +116,7 @@
|
|||||||
#define DAHDI_OFFHOOK ZT_OFFHOOK
|
#define DAHDI_OFFHOOK ZT_OFFHOOK
|
||||||
#define DAHDI_ONHOOK ZT_ONHOOK
|
#define DAHDI_ONHOOK ZT_ONHOOK
|
||||||
#define DAHDI_ONHOOKTRANSFER ZT_ONHOOKTRANSFER
|
#define DAHDI_ONHOOKTRANSFER ZT_ONHOOKTRANSFER
|
||||||
#define DAHDI_PARAMS ZT_PARAMS
|
#define dahdi_params zt_params
|
||||||
#define DAHDI_POLICY_IMMEDIATE ZT_POLICY_IMMEDIATE
|
#define DAHDI_POLICY_IMMEDIATE ZT_POLICY_IMMEDIATE
|
||||||
#define DAHDI_PRI ZT_PRI
|
#define DAHDI_PRI ZT_PRI
|
||||||
#define DAHDI_RING ZT_RING
|
#define DAHDI_RING ZT_RING
|
||||||
@@ -146,7 +146,7 @@
|
|||||||
#define DAHDI_SIG_HARDHDLC ZT_SIG_HARDHDLC
|
#define DAHDI_SIG_HARDHDLC ZT_SIG_HARDHDLC
|
||||||
#define DAHDI_SIG_HDLCFCS ZT_SIG_HDLCFCS
|
#define DAHDI_SIG_HDLCFCS ZT_SIG_HDLCFCS
|
||||||
#define DAHDI_SIG_SF ZT_SIG_SF
|
#define DAHDI_SIG_SF ZT_SIG_SF
|
||||||
#define DAHDI_SPANINFO ZT_SPANINFO
|
#define dahdi_spaninfo zt_spaninfo
|
||||||
#define DAHDI_SPANSTAT ZT_SPANSTAT
|
#define DAHDI_SPANSTAT ZT_SPANSTAT
|
||||||
#define DAHDI_SPECIFY ZT_SPECIFY
|
#define DAHDI_SPECIFY ZT_SPECIFY
|
||||||
#define DAHDI_START ZT_START
|
#define DAHDI_START ZT_START
|
||||||
@@ -172,8 +172,8 @@
|
|||||||
#define DAHDI_TONE_INFO ZT_TONE_INFO
|
#define DAHDI_TONE_INFO ZT_TONE_INFO
|
||||||
#define DAHDI_TONE_RINGTONE ZT_TONE_RINGTONE
|
#define DAHDI_TONE_RINGTONE ZT_TONE_RINGTONE
|
||||||
#define DAHDI_TONE_STUTTER ZT_TONE_STUTTER
|
#define DAHDI_TONE_STUTTER ZT_TONE_STUTTER
|
||||||
#define DAHDI_TRANSCODE_HEADER ZT_TRANSCODE_HEADER
|
#define dahdi_transcode_header zt_transcode_header
|
||||||
#define DAHDI_TRANSCODE_INFO ZT_TRANSCODE_INFO
|
#define dahdi_transcode_info zt_transcode_info
|
||||||
#define DAHDI_TRANSCODE_MAGIC ZT_TRANSCODE_MAGIC
|
#define DAHDI_TRANSCODE_MAGIC ZT_TRANSCODE_MAGIC
|
||||||
#define DAHDI_TRANSCODE_OP ZT_TRANSCODE_OP
|
#define DAHDI_TRANSCODE_OP ZT_TRANSCODE_OP
|
||||||
#define DAHDI_vldtmf ZT_vldtmf
|
#define DAHDI_vldtmf ZT_vldtmf
|
||||||
|
Reference in New Issue
Block a user