This commit is contained in:
Super User 2007-08-12 13:05:26 +02:00
parent b359d75e7d
commit 00e1539a7f
2 changed files with 57 additions and 35 deletions

View File

@ -712,16 +712,18 @@ char *admin_state(int sock, char *argv[])
else
SPRINT(buffer,"B%2d: ", j+1);
addstr(buffer);
if (!m[i].u.i.ptp)
goto ptmp;
if (m[i].u.i.l2link && m[i].u.i.block==0)
{
ptmp:
switch(m[i].u.i.busy[j])
{
case B_STATE_IDLE:
if ((!m[i].u.i.l2link && m[i].u.i.ptp) || m[i].u.i.block)
{
color(red);
addstr("blocked ");
} else
{
color(blue);
addstr("idle ");
}
break;
case B_STATE_ACTIVATING:
color(yellow);
@ -748,11 +750,6 @@ char *admin_state(int sock, char *argv[])
addstr("imp'ing ");
break;
}
} else
{
color(red);
addstr("blocked ");
}
if (m[i].u.i.port[j])
{
/* search for port */

25
asterisk_client.h Normal file
View File

@ -0,0 +1,25 @@
/*****************************************************************************\
** **
** Linux Call Router **
** **
**---------------------------------------------------------------------------**
** Copyright: Andreas Eversberg **
** **
** Asterisk socket client header **
** **
\*****************************************************************************/
/* structure for all calls */
struct chan_call {
struct chan_call *next;
unsigned long ref; /* callref, is 0, if not yet set */
unsigned long addr; /* reference to bchannel, if set */
};
/* structure of all bchannels (that are assinged by lcr) */
struct chan_bchannel {
struct chan_bchannel *next;
unsigned long addr; /* stack address */
unsigned long ref; /* if linked with a call, ref is set */
};