Re: [PATCH] Throttling support for AT smsc
Alexander Malysh <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Vincent,
patch doesn't apply:
fatal: corrupt patch at line 59
and this change is not what you want...
if (privdata->modem == NULL || privdata->modem->need_sleep)
- sleep(1);
+ gwthread_sleep(1);
you want to sleep 1 second because modem needs this. if you use gwthread_sleep other threads
could wake up this thread.
Thanks,
Alex
P.S. Otherwise patch looks good.
Am 15.06.2011 um 13:00 schrieb Vincent CHAVANIS:
> Hi,
>
> Sorry for the delay,
> here is the new patch with alex suggestion with some optimizations
>
> The patch has been edited manually, so telle me if it does not apply.
>
> regards
>
> Vincent.
>
>
> Le 20/05/2011 20:16, Alexander Malysh a écrit :
>> Hi Vincent,
>>
>> this is very easy:
>> a) if you sleep for throughput you don't receive any MOs
>> b) if you have something to send, this thread will be waked up any time and therefore there is no throughput garantee
>>
>> if you use load_XXX then all these issues can be avoided.
>>
>> Alex
>>
>> Am 19.05.2011 um 13:04 schrieb Vincent CHAVANIS:
>>
>>> Hi Alex,
>>>
>>> AT commands are synchronous and there is only one thread
>>> for sending and receving messages
>>>
>>> Why should i implement the load_XX function to do the trick ?
>>> (there is no need here to modify the PrivAT2data structure)
>>>
>>> Vincent
>>>
>>>
>>>
>>> Le 18/05/2011 20:50, Alexander Malysh a écrit :
>>>> Hi,
>>>>
>>>> why don't you use load_XX support? See smsc_smpp as example.
>>>> With only sleep thread will wakeup if new messages available for sending
>>>> and therefore you don't guarantee throughput.
>>>>
>>>> Alex
>>>>
>>>> Am 18.05.2011 um 14:48 schrieb Vincent CHAVANIS:
>>>>
>>>>> Hi all,
>>>>>
>>>>> Here is a small patch to support throttling on AT smsc
>>>>>
>>>>> Any comment ?
>>>>>
>>>>> regards
>>>>>
>>>>> Vincent.
>>>>> <smsc_at_throttling.txt>
>>>>
>>>
> <througputv2_at.txt>