mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
more fixes regarding warnings for gcc-4 and first additions for the restart Information element, in the first step we initiate a restart with a CLI command
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@50335 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -651,7 +651,7 @@ void clear_l3(struct misdn_stack *stack)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i=0; i<=stack->b_num; i++) {
|
||||
for (i=0; i<stack->b_num; i++) {
|
||||
if (global_state == MISDN_INITIALIZED) {
|
||||
cb_event(EVENT_CLEANUP, &stack->bc[i], NULL);
|
||||
empty_chan_in_stack(stack,i+1);
|
||||
@@ -3578,6 +3578,31 @@ int misdn_lib_pid_restart(int pid)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*Sends Restart message for every bchnanel*/
|
||||
int misdn_lib_send_restart(int port)
|
||||
{
|
||||
struct misdn_stack *stack=find_stack_by_port(port);
|
||||
cb_log(0, port, "Sending Restarts on this port.\n");
|
||||
|
||||
struct misdn_bchannel dummybc;
|
||||
memset (&dummybc,0,sizeof(dummybc));
|
||||
dummybc.port=stack->port;
|
||||
dummybc.l3_id=MISDN_ID_DUMMY;
|
||||
dummybc.nt=stack->nt;
|
||||
|
||||
int max=stack->pri?30:2;
|
||||
int i;
|
||||
for (i=1;i<max;i++) {
|
||||
dummybc.channel=i;
|
||||
cb_log(0, port, "Restarting channel %d\n",i);
|
||||
misdn_lib_send_event(&dummybc, EVENT_RESTART);
|
||||
/*do we need to wait before we get an EVENT_RESTART_ACK ?*/
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*reinitializes the L2/L3*/
|
||||
int misdn_lib_port_restart(int port)
|
||||
{
|
||||
struct misdn_stack *stack=find_stack_by_port(port);
|
||||
|
Reference in New Issue
Block a user