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