summaryrefslogtreecommitdiffstats
path: root/admin_server.c
diff options
context:
space:
mode:
authorSuper User2007-08-11 15:57:58 +0200
committerSuper User2007-08-11 15:57:58 +0200
commitcbe9d412a37e75b61cc74e8a65b0293923eb5160 (patch)
tree8aaf96ba18a5cbc2f5aed9fc0f16c87d7f5559b4 /admin_server.c
parentfixes, debugging for usleep problems. (diff)
downloadlcr-cbe9d412a37e75b61cc74e8a65b0293923eb5160.tar.gz
lcr-cbe9d412a37e75b61cc74e8a65b0293923eb5160.tar.xz
lcr-cbe9d412a37e75b61cc74e8a65b0293923eb5160.zip
added exporting/importing bchannel stacks to the remote application
Diffstat (limited to 'admin_server.c')
-rw-r--r--admin_server.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/admin_server.c b/admin_server.c
index f1275a6..6b0647b 100644
--- a/admin_server.c
+++ b/admin_server.c
@@ -107,7 +107,7 @@ void free_connection(struct admin_list *admin)
memset(&param, 0, sizeof(param));
param.disconnectinfo.cause = CAUSE_OUTOFORDER;
param.disconnectinfo.location = LOCATION_PRIVATE_LOCAL;
- ((class JoinRemote *)join)->message_remote(0, MESSAGE_RELEASE, &param);
+ ((class JoinRemote *)join)->message_remote(MESSAGE_RELEASE, &param);
/* join is now destroyed, so we go to next join */
}
join = joinnext;
@@ -511,7 +511,7 @@ int admin_call(struct admin_list *admin, struct admin_message *msg)
class Endpoint *epoint;
class EndpointAppPBX *apppbx;
- if (!(epoint = new Endpoint(0, 0, 0)))
+ if (!(epoint = new Endpoint(0, 0)))
FATAL("No memory for Endpoint instance\n");
if (!(epoint->ep_app = apppbx = new DEFAULT_ENDPOINT_APP(epoint)))
FATAL("No memory for Endpoint Application instance\n");
@@ -641,6 +641,17 @@ int admin_message_to_join(struct admin_msg *msg, char *remote_name, int sock_id)
return(0);
}
+ /* bchannel message
+ * no ref given for *_ack */
+ if (msg->type == MESSAGE_BCHANNEL)
+ if (msg->param.bchannel.type == BCHANNEL_ASSIGN_ACK
+ || msg->param.bchannel.type == BCHANNEL_REMOVE_ACK)
+ {
+ /* no ref, but address */
+ message_bchannel_from_join(NULL, msg->param.bchannel.type, msg->param.bchannel.addr);
+ return(0);
+ }
+
/* check for ref */
if (!msg->ref)
{
@@ -675,7 +686,7 @@ int admin_message_to_join(struct admin_msg *msg, char *remote_name, int sock_id)
}
/* send message */
- ((class JoinRemote *)join)->message_remote(msg->ref, msg->type, &msg->param);
+ ((class JoinRemote *)join)->message_remote(msg->type, &msg->param);
return(0);
}