manually merged r49922 and r50335, because of conflicts. this commint includes addition of the ISDN RESTART Message

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@51648 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Christian Richter
2007-01-23 10:05:54 +00:00
parent 964d2d2e42
commit 19fdc9b14e
3 changed files with 43 additions and 0 deletions

View File

@@ -3603,6 +3603,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);