summaryrefslogtreecommitdiffstats
path: root/asterisk_client.c
diff options
context:
space:
mode:
authorSuper User2007-08-26 15:23:58 +0200
committerSuper User2007-08-26 15:23:58 +0200
commitce197cab91d66c14f11d818f343720a785dd616e (patch)
treeb52d356ce4b101722a5e9a8da0e750b0eaef2039 /asterisk_client.c
parentdito (diff)
downloadlcr-ce197cab91d66c14f11d818f343720a785dd616e.tar.gz
lcr-ce197cab91d66c14f11d818f343720a785dd616e.tar.xz
lcr-ce197cab91d66c14f11d818f343720a785dd616e.zip
backup
Diffstat (limited to 'asterisk_client.c')
-rw-r--r--asterisk_client.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/asterisk_client.c b/asterisk_client.c
index 105bfb4..c430c30 100644
--- a/asterisk_client.c
+++ b/asterisk_client.c
@@ -60,7 +60,7 @@ struct admin_list {
struct chan_bchannel *bchannel_first;
struct chan_call *call_first;
-struct chan_bchannel *find_bchannel_addr(unsigned long addr)
+struct chan_bchannel *find_bchannel_handle(unsigned long addr)
{
struct chan_bchannel *bchannel = bchannel_first;
@@ -204,34 +204,34 @@ int receive_message(int message_type, unsigned long ref, union parameter *param)
switch(param->bchannel.type)
{
case BCHANNEL_ASSIGN:
- if ((bchannel = find_bchannel_addr(param->bchannel.addr)))
+ if ((bchannel = find_bchannel_handle(param->bchannel.handle)))
{
- fprintf(stderr, "error: bchannel addr %x already assigned.\n", param->bchannel.addr);
+ fprintf(stderr, "error: bchannel handle %x already assigned.\n", param->bchannel.handle);
return(-1);
}
/* create bchannel */
bchannel = alloc_bchannel();
- bchannel->addr = param->bchannel.addr;
+ bchannel->addr = param->bchannel.handle;
/* in case, ref is not set, this bchannel instance must
* be created until it is removed again by LCR */
/* link to call */
if ((call = find_call_ref(ref)))
{
bchannel->ref = ref;
- call->addr = param->bchannel.addr;
+ call->addr = param->bchannel.handle;
}
#warning open stack
/* acknowledge */
newparam.bchannel.type = BCHANNEL_ASSIGN_ACK;
- newparam.bchannel.addr = param->bchannel.addr;
+ newparam.bchannel.handle = param->bchannel.handle;
send_message(MESSAGE_BCHANNEL, 0, &newparam);
break;
case BCHANNEL_REMOVE:
- if (!(bchannel = find_bchannel_addr(param->bchannel.addr)))
+ if (!(bchannel = find_bchannel_handle(param->bchannel.handle)))
{
- fprintf(stderr, "error: bchannel addr %x not assigned.\n", param->bchannel.addr);
+ fprintf(stderr, "error: bchannel handle %x not assigned.\n", param->bchannel.handle);
return(-1);
}
/* unlink from call */
@@ -244,7 +244,7 @@ int receive_message(int message_type, unsigned long ref, union parameter *param)
#warning close stack
/* acknowledge */
newparam.bchannel.type = BCHANNEL_REMOVE_ACK;
- newparam.bchannel.addr = param->bchannel.addr;
+ newparam.bchannel.handle = param->bchannel.handle;
send_message(MESSAGE_BCHANNEL, 0, &newparam);
break;