diff options
author | Noe Rubinstein <nrubinstein@proformatique.com> | 2010-10-14 16:50:37 +0200 |
---|---|---|
committer | Noe Rubinstein <nrubinstein@proformatique.com> | 2010-10-14 16:50:37 +0200 |
commit | eb9b34f8f9c06b4008bf773cd8a7055b631f9194 (patch) | |
tree | 14cdf8ae2c872c4b5c3cc91ed59a6ef6bd6fa942 | |
parent | 3457e54068b631c54d17984b40729a23e4ca70f4 (diff) |
no return on error in vp_post_init
For the sake of being more "error tolerant" (and because returning
immediatly does not help anyway ; if it did, I wouldn't have lost more
than half my day wondering what's wrong with dahdi not transmitting sig)
In the future, the chans should be unregistered when there is an error.
-rw-r--r-- | xivovp/base.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/xivovp/base.c b/xivovp/base.c index d769fba..e364976 100644 --- a/xivovp/base.c +++ b/xivovp/base.c @@ -176,6 +176,7 @@ static void xivovp_hooksig_pvt(struct xivovp_line* line, enum dahdi_txsig txsig) break; case DAHDI_TXSIG_KEWL: printk(KERN_WARNING DRV_NAME "(chan %d): requested to transmit DAHDI_TXSIG_KEWL but I have no idea what it means.\n", chanpos); + // Something about battery drop when transmitting a hangup/ //VpSetLineState(line->vp_ctx, ); break; default: @@ -235,7 +236,6 @@ static void vp_post_init(VpEventType *event) if (vpst != VP_STATUS_SUCCESS) { printk(KERN_ERR DRV_NAME ": VpSetOption VP_OPTION_ID_EVENT_MASK returned %d\n", (int)vpst); - return; } vpst = VpSetOption(NULL, event->pDevCtx, VP_OPTION_ID_TIMESLOT, @@ -243,7 +243,6 @@ static void vp_post_init(VpEventType *event) if (vpst != VP_STATUS_SUCCESS) { printk(KERN_ERR DRV_NAME ": VpSetOption VP_OPTION_ID_TIMESLOT returned %d\n", (int)vpst); - return; } /* FXS */ @@ -252,14 +251,12 @@ static void vp_post_init(VpEventType *event) if (vpst != VP_STATUS_SUCCESS) { printk(KERN_ERR DRV_NAME ": VpSetLineState returned %d\n", (int)vpst); - return; } vpst = VpCalLine(&xivovp.line[FXS_LINE].vp_ctx); if (vpst != VP_STATUS_SUCCESS) { printk(KERN_ERR DRV_NAME ": VpCalLine returned %d\n", (int)vpst); - return; } /* FXO */ @@ -268,14 +265,12 @@ static void vp_post_init(VpEventType *event) if (vpst != VP_STATUS_SUCCESS) { printk(KERN_ERR DRV_NAME ": VpSetLineState returned %d\n", (int)vpst); - return; } vpst = VpCalLine(&xivovp.line[FXO_LINE].vp_ctx); if (vpst != VP_STATUS_SUCCESS) { printk(KERN_ERR DRV_NAME ": VpCalLine returned %d\n", (int)vpst); - return; } // XXX What happens if lines aren't connected? @@ -301,12 +296,14 @@ static void event_calibration_fail(VpEventType *event) static void event_hook_off(VpEventType *event) { struct xivovp_line *line = xivovp_line_from_ctx(event->pLineCtx); + printk(KERN_INFO DRV_NAME ": received hook off event on %s\n", line->chan.name); dahdi_hooksig(&line->chan, DAHDI_RXSIG_OFFHOOK); } static void event_hook_on(VpEventType *event) { struct xivovp_line *line = xivovp_line_from_ctx(event->pLineCtx); + printk(KERN_INFO DRV_NAME ": received hook on event %s\n", line->chan.name); dahdi_hooksig(&line->chan, DAHDI_RXSIG_ONHOOK); } |