work on unfinished asterisk channel driver (bchannel handling)
[lcr.git] / admin_server.c
index 6b0647b..2624ad7 100644 (file)
@@ -513,7 +513,7 @@ int admin_call(struct admin_list *admin, struct admin_message *msg)
 
        if (!(epoint = new Endpoint(0, 0)))
                FATAL("No memory for Endpoint instance\n");
-       if (!(epoint->ep_app = apppbx = new DEFAULT_ENDPOINT_APP(epoint)))
+       if (!(epoint->ep_app = apppbx = new DEFAULT_ENDPOINT_APP(epoint, 1))) // outgoing
                FATAL("No memory for Endpoint Application instance\n");
        apppbx->e_adminid = admin->sockserial;
        admin->epointid = epoint->ep_serial;
@@ -648,7 +648,7 @@ int admin_message_to_join(struct admin_msg *msg, char *remote_name, int sock_id)
         || msg->param.bchannel.type == BCHANNEL_REMOVE_ACK)
        {
                /* no ref, but address */
-               message_bchannel_from_join(NULL, msg->param.bchannel.type, msg->param.bchannel.addr);
+               message_bchannel_from_join(NULL, msg->param.bchannel.type, msg->param.bchannel.handle);
                return(0);
        }
        
@@ -1087,7 +1087,7 @@ int admin_handle(void)
        if (sock < 0)
                return(0);
 
-       /* check for new incomming connections */
+       /* check for new incoming connections */
        if ((new_sock = accept(sock, (struct sockaddr *)&sock_address, &sock_len)) >= 0)
        {
                work = 1;
@@ -1096,7 +1096,7 @@ int admin_handle(void)
                if (ioctl(new_sock, FIONBIO, (unsigned char *)(&on)) >= 0)
                {
 //#warning
-//     PERROR("DEBUG incomming socket %d, serial=%d\n", new_sock, sockserial);
+//     PERROR("DEBUG incoming socket %d, serial=%d\n", new_sock, sockserial);
                        memuse++;
                        fhuse++;
                        admin->sockserial = sockserial++;
@@ -1153,7 +1153,7 @@ int admin_handle(void)
                                if (epoint)
                                {
                                        ((class DEFAULT_ENDPOINT_APP *)epoint->ep_app)->
-                                               release(RELEASE_ALL, CAUSE_NORMAL, LOCATION_PRIVATE_LOCAL, 0, 0);
+                                               release(RELEASE_ALL, LOCATION_PRIVATE_LOCAL, CAUSE_NORMAL, LOCATION_PRIVATE_LOCAL, CAUSE_NORMAL);
                                }
                        }