aboutsummaryrefslogtreecommitdiffstats
path: root/channels/misdn
diff options
context:
space:
mode:
authorcrichter <crichter@f38db490-d61c-443f-a65b-d21fe96a405b>2007-05-08 15:07:37 +0000
committercrichter <crichter@f38db490-d61c-443f-a65b-d21fe96a405b>2007-05-08 15:07:37 +0000
commit4c974b0078f4509e584ea5e61e4887f9545b4190 (patch)
tree9040dfc7d5ab953b81222d3b208e5501fe473b31 /channels/misdn
parentb670645e9bc561f66e4039780047adfaa2fa19c9 (diff)
added application misdn_check_l2l1 which tries to pull up the L1/L2 on all ports that have the layers down in a group. It waits then for a timeout. This helps for scenarios where multiple PMP BRIs are grouped together, or where a provider has a faulty PTP Implementation, that looses the L2 after a while.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@63402 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/misdn')
-rw-r--r--channels/misdn/isdn_lib.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/channels/misdn/isdn_lib.c b/channels/misdn/isdn_lib.c
index 439f3a880..70f5c9a9b 100644
--- a/channels/misdn/isdn_lib.c
+++ b/channels/misdn/isdn_lib.c
@@ -16,6 +16,9 @@
#include "isdn_lib_intern.h"
#include <mISDNuser/isdn_debug.h>
+
+int cfg_remember_l1=0;
+
void misdn_join_conf(struct misdn_bchannel *bc, int conf_id);
void misdn_split_conf(struct misdn_bchannel *bc, int conf_id);
@@ -1318,7 +1321,7 @@ struct misdn_stack* stack_init( int midev, int port, int ptp )
#endif
misdn_lib_get_short_status(stack);
misdn_lib_get_l1_up(stack);
- misdn_lib_get_l2_up(stack);
+ misdn_lib_get_l2_up(stack);
}
cb_log(8,0,"stack_init: port:%d lowerId:%x upperId:%x\n",stack->port,stack->lower_id, stack->upper_id);
@@ -1711,7 +1714,7 @@ int misdn_lib_port_up(int port, int check)
if (stack->l1link && stack->l2link) {
return 1;
} else {
- cb_log(0,port, "Port Down L2:%d L1:%d\n",
+ cb_log(1,port, "Port Down L2:%d L1:%d\n",
stack->l2link, stack->l1link);
return 0;
}
@@ -1719,7 +1722,7 @@ int misdn_lib_port_up(int port, int check)
if ( !check || stack->l1link )
return 1;
else {
- cb_log(0,port, "Port down PMP\n");
+ cb_log(1,port, "Port down PMP\n");
return 0;
}
}
@@ -2848,8 +2851,11 @@ int handle_mgmt(msg_t *msg)
/*when the L2 goes UP, L1 needs to be UP too*/
stack->l1link=1;
stack->l2link=1;
- if ( !stack->ptp && !stack->nt )
- stack->l1link=2;
+
+ if (cfg_remember_l1) {
+ if ( !stack->ptp && !stack->nt )
+ stack->l1link=2;
+ }
break;
case SSTATUS_L2_RELEASED: