>Hi,
>I use the version of kannel 1.1.6.
>I am trying to make a thread that must do :
>- querry a database
>- send new messages (stored in the database)
>
>In smsc_emi2.c I write a function that querries the database called db_sender.
>In smsc_emi2_create function I have started the thread right after 
>the receiver_thread
>with the line
>gwthread_create(db_sender,conn);
>
>when I start bearerbox, the thread starts and loops ok an he sends messages.
>The the problem is that when I receive a message, my thread (db_sender) stops.
>
>I send messages with function add_msg_cb(conn,msg).
>Cann you tell me what is wrong?


I think your whole approach is wrong. You should do this kind of 
thing in a separate application. You then can link this separate 
application to gwlib and use gwlib's HTTP library function to deliver 
your messages from the database on to kannel. This will make your 
code much more portable, you dont have to mess with all the internals 
of Msg * and your code works with multiple SMSC types.


-- 
Andreas Fink
Global Networks Inc.

--------------------------------------------------------------------------
Tel: +41-61-6932730 Fax: +41-61-6932729  Mobile: +41-79-2457333
Address:Global Networks Inc, Schwarzwaldallee 16, 4058 Basel, Switzerland
Web: http://www.global-networks.ch/     e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------------
Member of the GSM Association

Reply via email to