Re: who wakes the sendsms thread

2006-08-20 Thread Andreas Fink
There are usually two threads on AT driver. One sitting on the device to READ. So its waiting in a poll call until some data arrives to be read. The other sits on a list and waits until bearerbox main driver puts something in it and wakes the thread by doing that.On 20.08.2006, at 09:04, Akshat Choudhary wrote:Hi,I am a new user of kannel. I am using kannel with a GSM modem, but I have noticed this one issue. Suppose I try and send a message using "sendsms" the message is sent only after some irregular interval. But, if I send a sms from my mobile, to which the reply is sent using "sendsms" the message is sent immediately. Also any other queued messages are sent at that time too. Now I tried looking into the code and was lost in this maze of threads and locks. On further inspection I figured that the "at2_device_thread" blocks but was unable to figure out the event which will unblock this thread, leading to the message being sent. Please help. Also any architecture guide giving details of the threads and the locks will be very helpful.Thanks,akshat Andreas FinkFink Consulting GmbH---Tel: +41-61-332 Fax: +41-61-331  Mobile: +41-79-2457333Address: Clarastrasse 3, 4058 Basel, SwitzerlandE-Mail:  [EMAIL PROTECTED]Homepage: http://www.finkconsulting.com---ICQ: 8239353MSN: [EMAIL PROTECTED] AIM: smsrelay Skype: andreasfinkYahoo: finkconsulting SMS: +41792457333 

Re: who wakes the sendsms thread

2006-08-20 Thread Akshat Choudhary
Yeah, I noticed the two threads. The one which is supposed to write to the modem is the one that appears to be blocking and delaying the whole system. The outgoing_sms list is getting populated for that device but it is not waking up as soon as the message is forwarded. How can we wake this thread so that all outgoing messages are sent out immediately.
Thanks,akshatOn 8/20/06, Andreas Fink [EMAIL PROTECTED] wrote:
There are usually two threads on AT driver. One sitting on the device to READ. So its waiting in a poll call until some data arrives to be read. The other sits on a list and waits until bearerbox main driver puts something in it and wakes the thread by doing that.
On 20.08.2006, at 09:04, Akshat Choudhary wrote:Hi,I am a new user of kannel. I am using kannel with a GSM modem, but I have noticed this one issue. Suppose I try and send a message using sendsms the message is sent only after some irregular interval. But, if I send a sms from my mobile, to which the reply is sent using sendsms the message is sent immediately. Also any other queued messages are sent at that time too. 
Now I tried looking into the code and was lost in this maze of threads and locks. On further inspection I figured that the at2_device_thread blocks but was unable to figure out the event which will unblock this thread, leading to the message being sent. 
Please help. Also any architecture guide giving details of the threads and the locks will be very helpful.Thanks,akshat 

Andreas Fink
Fink Consulting GmbH
---
Tel: +41-61-332 Fax: +41-61-331
 Mobile: +41-79-2457333
Address: Clarastrasse 3, 4058 Basel, Switzerland
E-Mail:
 
[EMAIL PROTECTED]
Homepage: 
http://www.finkconsulting.com
---
ICQ: 8239353MSN: 
[EMAIL PROTECTED] AIM: smsrelay Skype: andreasfink
Yahoo: finkconsulting SMS: +41792457333 



Re: who wakes the sendsms thread

2006-08-20 Thread Akshat Choudhary
Found another detail. The write thread seems to be blocking inside tcdrain() call from at2_write_line.what could be the issue here?thanks,akshatOn 8/20/06, 
Akshat Choudhary [EMAIL PROTECTED] wrote:
Yeah, I noticed the two threads. The one which is supposed to write to the modem is the one that appears to be blocking and delaying the whole system. The outgoing_sms list is getting populated for that device but it is not waking up as soon as the message is forwarded. How can we wake this thread so that all outgoing messages are sent out immediately.
Thanks,akshatOn 8/20/06, Andreas Fink 
[EMAIL PROTECTED] wrote:
There are usually two threads on AT driver. One sitting on the device to READ. So its waiting in a poll call until some data arrives to be read. The other sits on a list and waits until bearerbox main driver puts something in it and wakes the thread by doing that.
On 20.08.2006, at 09:04, Akshat Choudhary wrote:Hi,I am a new user of kannel. I am using kannel with a GSM modem, but I have noticed this one issue. Suppose I try and send a message using sendsms the message is sent only after some irregular interval. But, if I send a sms from my mobile, to which the reply is sent using sendsms the message is sent immediately. Also any other queued messages are sent at that time too. 
Now I tried looking into the code and was lost in this maze of threads and locks. On further inspection I figured that the at2_device_thread blocks but was unable to figure out the event which will unblock this thread, leading to the message being sent. 
Please help. Also any architecture guide giving details of the threads and the locks will be very helpful.Thanks,akshat 



Andreas Fink

Fink Consulting GmbH

---

Tel: +41-61-332 Fax: +41-61-331

 Mobile: +41-79-2457333

Address: Clarastrasse 3, 4058 Basel, Switzerland

E-Mail:

 

[EMAIL PROTECTED]

Homepage: 

http://www.finkconsulting.com

---

ICQ: 8239353MSN: 

[EMAIL PROTECTED] AIM: smsrelay Skype: andreasfink

Yahoo: finkconsulting SMS: +41792457333