Hi All,

I use Kannel with EMI2 connection to smsc.
I think there is a bug in EMI2 driver in cvs version of Kannel.
Termination of bearerbox ends with:

2003-01-13 13:46:21 [20] PANIC: gwlib/thread.c:79: mutex_lock_real: Mutex
failure! (Called from gwlib/counter.c:45:counter_increase.)

I have checked sources and found in smsc_emi2.c:

503 static int handle_operation(SMSCConn *conn, Connection *server,
504       struct emimsg *emimsg)
505 {
           ...
515     switch(emimsg->ot) {
516     case 01:
               ...
572         bb_smscconn_receive(conn, msg);
               ...
581     case 52:
               ...
713         counter_increase(conn->received);    <--why is it here?? this
line should be removed
714         bb_smscconn_receive(conn, msg);
       ...
773 }

Acording to comment in smscconn_p.c :
102    /* connection specific counters (created in smscconn.c, updated
103     *  by callback functions in bb_smscconn.c, NOT used by specific
driver) */

this counter should not be increased here.

Actually, it is increased in function bb_smscconn_receive(..) called in next
line.
Besides, conn->received is not increased in EMI2 driver when message comes
with OT=01 from SMSC.

I removed this line in local version and everything works well.

Regards
Robert Galach


Reply via email to