Added layer1 hold feature. Requires new mISDN and mISDNuser package from git.
[lcr.git] / socket_server.c
index 166080d..a527114 100644 (file)
@@ -91,7 +91,7 @@ void free_connection(struct admin_list *admin)
        /* free remote joins */
        if (admin->remote_name[0])
        {
-               start_trace(0,
+               start_trace(-1,
                        NULL,
                        NULL,
                        NULL,
@@ -298,7 +298,7 @@ int admin_route(struct admin_queue **responsep)
                        apppbx->e_callback = 0;
                        apppbx->e_action = NULL;
                        apppbx->release(RELEASE_ALL, LOCATION_PRIVATE_LOCAL, CAUSE_NORMAL, LOCATION_PRIVATE_LOCAL, CAUSE_NORMAL);
-                       start_trace(0,
+                       start_trace(-1,
                                NULL,
                                numberrize_callerinfo(apppbx->e_callerinfo.id, apppbx->e_callerinfo.ntype, options.national, options.international),
                                apppbx->e_dialinginfo.id,
@@ -415,6 +415,7 @@ int admin_block(struct admin_queue **responsep, int portnum, int block)
        response->am[0].u.x.portnum = portnum;
 
        /* search for port */
+       ifport = NULL;
        interface = interface_first;
        while(interface)
        {
@@ -646,7 +647,7 @@ int admin_message_to_join(struct admin_msg *msg, struct admin_list *admin)
                }
                /* set remote socket instance */
                SCPY(admin->remote_name, msg->param.hello.application);
-               start_trace(0,
+               start_trace(-1,
                        NULL,
                        NULL,
                        NULL,
@@ -887,6 +888,8 @@ int admin_state(struct admin_queue **responsep)
                        SCPY(response->am[num].u.i.interface_name, interface->name);
                        /* portnum */
                        response->am[num].u.i.portnum = ifport->portnum;
+                       /* portname */
+                       SCPY(response->am[num].u.i.portname, ifport->portname);
                        /* iftype */
                        response->am[num].u.i.extension = interface->extension;
                        /* block */
@@ -897,6 +900,10 @@ int admin_state(struct admin_queue **responsep)
 
                                /* ptp */
                                response->am[num].u.i.ptp = mISDNport->ptp;
+                               /* l1hold */
+                               response->am[num].u.i.l1hold = mISDNport->l1hold;
+                               /* l2hold */
+                               response->am[num].u.i.l2hold = mISDNport->l2hold;
                                /* ntmode */
                                response->am[num].u.i.ntmode = mISDNport->ntmode;
                                /* pri */
@@ -1178,7 +1185,6 @@ int admin_handle(void)
                        {
                                work = 1;
                                brokenpipe:
-                               printf("Broken pipe on socket %d. (errno=%d).\n", admin->sock, errno);
                                PDEBUG(DEBUG_LOG, "Broken pipe on socket %d. (errno=%d).\n", admin->sock, errno);
                                *adminp = admin->next;
                                free_connection(admin);