Re: Sqlbox performance patch

Rinor Hoxha <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
Also on static void sql_list(Boxc *boxc),
perform /* convert validity & deferred back to minutes */
only if save_mt == 1 ,(as you do in sql_single),
otherwise spare some unnecessary calculations.

if (save_mt) {
/* convert validity & deferred back to minutes */
if (msg->sms.validity != SMS_PARAM_UNDEFINED)
    msg->sms.validity = (msg->sms.validity - time(NULL))/60;
if (msg->sms.deferred != SMS_PARAM_UNDEFINED)
    msg->sms.deferred = (msg->sms.deferred - time(NULL))/60;
}

Br, Rinor
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.