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]



Reply via email to