diff options
Diffstat (limited to 'accel-pppd/ppp/ppp.c')
-rw-r--r-- | accel-pppd/ppp/ppp.c | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/accel-pppd/ppp/ppp.c b/accel-pppd/ppp/ppp.c index 3b65dfe..a0f65f1 100644 --- a/accel-pppd/ppp/ppp.c +++ b/accel-pppd/ppp/ppp.c @@ -433,16 +433,11 @@ static void ppp_ifup(struct ppp_t *ppp) triton_event_fire(EV_PPP_STARTED, ppp); } -void __export ppp_layer_started(struct ppp_t *ppp, struct ppp_layer_data_t *d) +static void __ppp_layer_started(struct ppp_t *ppp, struct ppp_layer_data_t *d) { struct layer_node_t *n = d->node; int f = 0; - if (d->started) - return; - - d->started = 1; - list_for_each_entry(d, &n->items, entry) { if (!d->started && !d->passive) return; if (d->started && !d->optional) @@ -470,6 +465,26 @@ void __export ppp_layer_started(struct ppp_t *ppp, struct ppp_layer_data_t *d) } } +void __export ppp_layer_started(struct ppp_t *ppp, struct ppp_layer_data_t *d) +{ + if (d->started) + return; + + d->started = 1; + + __ppp_layer_started(ppp, d); +} + +void __export ppp_layer_passive(struct ppp_t *ppp, struct ppp_layer_data_t *d) +{ + if (d->started) + return; + + d->passive = 1; + + __ppp_layer_started(ppp, d); +} + void __export ppp_layer_finished(struct ppp_t *ppp, struct ppp_layer_data_t *d) { struct layer_node_t *n = d->node; |