Re: Queue length

Alexander Malysh <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
yes, I think bearerbox.h is a good place...

Am 31.08.2009 um 12:01 schrieb Alejandro Guerrieri:

> Ok, where do you suggest to place the macro definition? bearerbox.h?
>
> Regards,
> --
> Alejandro Guerrieri
> [email protected]
>
>
>
> On 31/08/2009, at 11:50, Alexander Malysh wrote:
>
>> Hi,
>>
>> DEFAULT_OUTGOING_SMS_QLENGTH please :)
>>
>> Otherwise some people may think about incoming queue too.
>>
>> Thanks,
>> Alex
>>
>> Am 31.08.2009 um 11:30 schrieb Alejandro Guerrieri:
>>
>>> Well, then I'd do it directly when loading the value on  
>>> max_outgoing_sms_qlength instead of passing -1 and changing it to  
>>> 1M later on.
>>>
>>> if (cfg_get_integer(&max_outgoing_sms_qlength, grp,
>>>                                   octstr_imm("sms-outgoing-queue- 
>>> limit")) == -1)
>>>         max_outgoing_sms_qlength = -1;
>>>
>>> ==>
>>>
>>> #define DEFAULT_SMS_QLENGTH 1000000 (on bearerbox.h?)
>>>
>>> ....
>>>
>>> if (cfg_get_integer(&max_outgoing_sms_qlength, grp,
>>>                                   octstr_imm("sms-outgoing-queue- 
>>> limit")) == -1)
>>>         max_outgoing_sms_qlength = DEFAULT_SMS_QLENGTH;
>>>
>>>
>>> I'll prepare a doc patch in the meantime.
>>>
>>> Regards,
>>> --
>>> Alejandro Guerrieri
>>> [email protected]
>>>
>>>
>>>
>>> On 31/08/2009, at 11:11, Alexander Malysh wrote:
>>>
>>>> Hi Alex,
>>>>
>>>> sorry for delay... Yes you are right, -1 meanst not infitine but  
>>>> large enough IMO. We should fix docs but not the code.
>>>> Because if someone want to allow bigger queue then he can set it  
>>>> in config.
>>>>
>>>> Thanks,
>>>> Alex
>>>>
>>>> Am 29.08.2009 um 12:40 schrieb Alejandro Guerrieri:
>>>>
>>>>> Alex, can you confirm? If that's the case, IMO we should either  
>>>>> fix the documentation or change the code. On a bulk-sending  
>>>>> scenario 1M is far from being considered infinite.
>>>>>
>>>>> Regards,
>>>>> --
>>>>> Alejandro Guerrieri
>>>>> [email protected]
>>>>>
>>>>>
>>>>>
>>>>> On 29/08/2009, at 10:27, Nikos Balkanas wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> It is common for some configuration variables to be converted  
>>>>>> to more manageable values in the code, depending on function  
>>>>>> calls. Seems 1000000 is considered large enough in this  
>>>>>> implementation to be practically infinite.
>>>>>>
>>>>>> @Alex M: Could you please check the Reply-To field in the lists  
>>>>>> (devel&users). Lately it is all wrong.
>>>>>>
>>>>>> BR,
>>>>>> Nikos
>>>>>> ----- Original Message -----
>>>>>> From: Alejandro Guerrieri
>>>>>> To: Kannel Devel
>>>>>> Sent: Saturday, August 29, 2009 2:16 AM
>>>>>> Subject: Queue length
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I was checking the code that handles the outgoing queue and  
>>>>>> I've came into this that got me confused.
>>>>>>
>>>>>> On gw/bb_smsconn.c, around line 1170:
>>>>>>
>>>>>>     /*
>>>>>>      * if global queue not empty then 20% reserved for old msgs
>>>>>>      * and 80% for new msgs. So we can guarantee that old msgs  
>>>>>> find
>>>>>>      * place in the SMSC's queue.
>>>>>>      */
>>>>>>     if (max_outgoing_sms_qlength > 0 &&  
>>>>>> gwlist_len(outgoing_sms) > 0) {
>>>>>>         max_queue = (resend ? max_outgoing_sms_qlength :
>>>>>>                                max_outgoing_sms_qlength * 0.8);
>>>>>>     }
>>>>>>     else
>>>>>>         max_queue = (max_outgoing_sms_qlength > 0 ?  
>>>>>> max_outgoing_sms_qlength : 1000000);
>>>>>>
>>>>>> However, the documentation states:
>>>>>>
>>>>>> sms-outgoing-queue-limit	number of messages	Set maximum size of  
>>>>>> outgoing message queue. After number of messages has hit this  
>>>>>> value, Kannel began to discard them. Value -1 default, means  
>>>>>> that the queue of infinite length is accepted.
>>>>>>
>>>>>> Variable max_outgoing_sms_qlength gets defined on gw/ 
>>>>>> bearerbox.c line 494:
>>>>>>
>>>>>>     if (cfg_get_integer(&max_outgoing_sms_qlength, grp,
>>>>>>                                   octstr_imm("sms-outgoing- 
>>>>>> queue-limit")) == -1)
>>>>>>         max_outgoing_sms_qlength = -1;
>>>>>>
>>>>>> So, assuming I don't define it (gets loaded with -1), the  
>>>>>> "else" condition would be true and since  
>>>>>> max_outgoing_sms_qlength < 0, max_queue would be 1000000 right?
>>>>>>
>>>>>> In other words: is the documentation wrong and -1 means 1000000  
>>>>>> instead of infinite?
>>>>>>
>>>>>> Regards,
>>>>>> --
>>>>>> Alejandro Guerrieri
>>>>>> [email protected]
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.