backup
[lcr.git] / admin_server.c
index 80f2875..9ccc18e 100644 (file)
@@ -236,9 +236,6 @@ int admin_route(struct admin_queue **responsep)
                                case ACTION_EXTERNAL:
                                apppbx->e_action = &action_external;
                                break;
-                               case ACTION_H323:
-                               apppbx->e_action = &action_h323;
-                               break;
                                case ACTION_CHAN:
                                apppbx->e_action = &action_chan;
                                break;
@@ -665,7 +662,7 @@ int admin_state(struct admin_queue **responsep)
                        response->am[num].u.e.state = ADMIN_STATE_IDLE;
                }
                /* terminal */
-               SCPY(response->am[num].u.e.terminal, apppbx->e_terminal);
+               SCPY(response->am[num].u.e.terminal, apppbx->e_ext.number);
                /* callerid */
                SCPY(response->am[num].u.e.callerid, apppbx->e_callerinfo.id);
                /* dialing */
@@ -912,6 +909,12 @@ int admin_handle(void)
                        if (admin_state(&admin->response) < 0)
                        {
                                PERROR("Failed to create state response for socket %d.\n", admin->sock);
+                               goto response_error;
+                       }
+                       case ADMIN_REQUEST_MESSAGE:
+                       if (admin_message(&admin->response) < 0)
+                       {
+                               PERROR("Failed to create message response for socket %d.\n", admin->sock);
                                response_error:
                                *adminp = admin->next;
                                free_connection(admin);