@ -829,7 +829,6 @@ static inline int monitor_handle_owned(struct vpb_pvt *p, VPB_EVENT *e)
{
struct ast_frame f = { AST_FRAME_CONTROL } ; /* default is control, Clear rest. */
int endbridge = 0 ;
int res = 0 ;
ast_verb ( 4 , " %s: handle_owned: got event: [%d=>%d] \n " , p - > dev , e - > type , e - > data ) ;
@ -1055,7 +1054,7 @@ static inline int monitor_handle_owned(struct vpb_pvt *p, VPB_EVENT *e)
}
if ( endbridge ) {
res = ast_mutex_unlock( & p - > lock ) ;
ast_mutex_unlock( & p - > lock ) ;
/*
ast_verb ( 4 , " %s: unLOCKING in handle_owned [%d] \n " , p - > dev , res ) ;
*/
@ -1079,7 +1078,7 @@ static inline int monitor_handle_owned(struct vpb_pvt *p, VPB_EVENT *e)
p - > dev , f . frametype , f . subclass . integer ) ;
}
}
res = ast_mutex_unlock( & p - > lock ) ;
ast_mutex_unlock( & p - > lock ) ;
/*
ast_verb ( 4 , " %s: unLOCKING in handle_owned [%d] \n " , p - > dev , res ) ;
*/
@ -1656,7 +1655,6 @@ static int vpb_indicate(struct ast_channel *ast, int condition, const void *data
{
struct vpb_pvt * p = ( struct vpb_pvt * ) ast - > tech_pvt ;
int res = 0 ;
int tmp = 0 ;
if ( use_ast_ind = = 1 ) {
ast_verb ( 4 , " %s: vpb_indicate called when using Ast Indications !?! \n " , p - > dev ) ;
@ -1720,17 +1718,13 @@ static int vpb_indicate(struct ast_channel *ast, int condition, const void *data
res = 0 ;
break ;
}
tmp = ast_mutex_unlock ( & p - > lock ) ;
/*
ast_verb ( 4 , " %s: unLOCKING in indicate [%d] \n " , p - > dev , tmp ) ;
*/
ast_mutex_unlock ( & p - > lock ) ;
return res ;
}
static int vpb_fixup ( struct ast_channel * oldchan , struct ast_channel * newchan )
{
struct vpb_pvt * p = ( struct vpb_pvt * ) newchan - > tech_pvt ;
int res = 0 ;
/*
ast_verb ( 4 , " %s: LOCKING in fixup \n " , p - > dev ) ;
@ -1753,10 +1747,7 @@ static int vpb_fixup(struct ast_channel *oldchan, struct ast_channel *newchan)
}
}
res = ast_mutex_unlock ( & p - > lock ) ;
/*
ast_verb ( 4 , " %s: unLOCKING in fixup [%d] \n " , p - > dev , res ) ;
*/
ast_mutex_unlock ( & p - > lock ) ;
return 0 ;
}
@ -1769,7 +1760,6 @@ static int vpb_digit_end(struct ast_channel *ast, char digit, unsigned int durat
{
struct vpb_pvt * p = ( struct vpb_pvt * ) ast - > tech_pvt ;
char s [ 2 ] ;
int res = 0 ;
if ( use_ast_dtmf ) {
ast_verb ( 4 , " %s: vpb_digit: asked to play digit[%c] but we are using asterisk dtmf play back?! \n " , p - > dev , digit ) ;
@ -1792,10 +1782,7 @@ static int vpb_digit_end(struct ast_channel *ast, char digit, unsigned int durat
strncat ( p - > play_dtmf , s , sizeof ( * p - > play_dtmf ) - strlen ( p - > play_dtmf ) - 1 ) ;
ast_mutex_unlock ( & p - > play_dtmf_lock ) ;
res = ast_mutex_unlock ( & p - > lock ) ;
/*
ast_verb ( 4 , " %s: unLOCKING in digit [%d] \n " , p - > dev , res ) ;
*/
ast_mutex_unlock ( & p - > lock ) ;
return 0 ;
}
@ -1806,7 +1793,6 @@ static int vpb_call(struct ast_channel *ast, char *dest, int timeout)
int res = 0 , i ;
char * s = strrchr ( dest , ' / ' ) ;
char dialstring [ 254 ] = " " ;
int tmp = 0 ;
/*
ast_verb ( 4 , " %s: LOCKING in call \n " , p - > dev ) ;
@ -1829,10 +1815,7 @@ static int vpb_call(struct ast_channel *ast, char *dest, int timeout)
if ( ast - > _state ! = AST_STATE_DOWN & & ast - > _state ! = AST_STATE_RESERVED ) {
ast_log ( LOG_WARNING , " vpb_call on %s neither down nor reserved! \n " , ast - > name ) ;
tmp = ast_mutex_unlock ( & p - > lock ) ;
/*
ast_verb ( 4 , " %s: unLOCKING in call [%d] \n " , p - > dev , tmp ) ;
*/
ast_mutex_unlock ( & p - > lock ) ;
return - 1 ;
}
if ( p - > mode ! = MODE_FXO ) /* Station port, ring it. */
@ -1901,10 +1884,7 @@ static int vpb_call(struct ast_channel *ast, char *dest, int timeout)
ast_pthread_create ( & p - > readthread , NULL , do_chanreads , ( void * ) p ) ;
}
tmp = ast_mutex_unlock ( & p - > lock ) ;
/*
ast_verb ( 4 , " %s: unLOCKING in call [%d] \n " , p - > dev , tmp ) ;
*/
ast_mutex_unlock ( & p - > lock ) ;
return res ;
}
@ -1913,7 +1893,6 @@ static int vpb_hangup(struct ast_channel *ast)
struct vpb_pvt * p = ( struct vpb_pvt * ) ast - > tech_pvt ;
VPB_EVENT je ;
char str [ VPB_MAX_STR ] ;
int res = 0 ;
/*
ast_verb ( 4 , " %s: LOCKING in hangup \n " , p - > dev ) ;
@ -1925,10 +1904,7 @@ static int vpb_hangup(struct ast_channel *ast)
if ( ! ast - > tech | | ! ast - > tech_pvt ) {
ast_log ( LOG_WARNING , " %s: channel not connected? \n " , ast - > name ) ;
res = ast_mutex_unlock ( & p - > lock ) ;
/*
ast_verb ( 4 , " %s: unLOCKING in hangup [%d] \n " , p - > dev , res ) ;
*/
ast_mutex_unlock ( & p - > lock ) ;
/* Free up ast dsp if we have one */
if ( use_ast_dtmfdet & & p - > vad ) {
ast_dsp_free ( p - > vad ) ;
@ -2013,21 +1989,13 @@ static int vpb_hangup(struct ast_channel *ast)
ast_verb ( 2 , " %s: Hangup complete \n " , ast - > name ) ;
restart_monitor ( ) ;
/*
ast_verb ( 4 , " %s: LOCKING in hangup count[%d] owner[%d] \n " , p - > dev , p - > lock . __m_count , p - > lock . __m_owner ) ;
*/
res = ast_mutex_unlock ( & p - > lock ) ;
/*
ast_verb ( 4 , " %s: unLOCKING in hangup [%d] \n " , p - > dev , res ) ;
ast_verb ( 4 , " %s: LOCKING in hangup count[%d] owner[%d] \n " , p - > dev , p - > lock . __m_count , p - > lock . __m_owner ) ;
*/
ast_mutex_unlock ( & p - > lock ) ;
return 0 ;
}
static int vpb_answer ( struct ast_channel * ast )
{
struct vpb_pvt * p = ( struct vpb_pvt * ) ast - > tech_pvt ;
int res = 0 ;
/*
VPB_EVENT je ;
int ret ;
@ -2078,10 +2046,7 @@ static int vpb_answer(struct ast_channel *ast)
ast_verb ( 4 , " %s: Re-enabling Loop Drop detection \n " , p - > dev ) ;
vpb_enable_event ( p - > handle , VPB_MDROP ) ;
}
res = ast_mutex_unlock ( & p - > lock ) ;
/*
ast_verb ( 4 , " %s: unLOCKING in answer [%d] \n " , p - > dev , res ) ;
*/
ast_mutex_unlock ( & p - > lock ) ;
return 0 ;
}