From eb9b34f8f9c06b4008bf773cd8a7055b631f9194 Mon Sep 17 00:00:00 2001 From: Noe Rubinstein Date: Thu, 14 Oct 2010 16:50:37 +0200 Subject: 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. --- xivovp/base.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'xivovp') 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); } -- cgit v1.2.3