Re: [PATCH] SQLBOX Delivery Reports Insert

"Mi Reflejo" <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
I miss to add the same condition in bearerbox_to_sql. So here it is.

Martín.

On 5/13/06, Mi Reflejo <[email protected]> wrote:
> *gw/sqlbox.c
> -Removed unnecessary INSERT's into database.
> bearerbox_to_smsbox shouldn't INSERT delivery reports as type "MO".
> condition added to discard delivery reports.
>
>
>
sqlbox-report_mo_2.patch (application/octet-stream, 848 B)
--- sqlbox.c.orig       2006-05-13 05:58:13.000000000 -0600
+++ sqlbox.c    2006-05-13 07:07:01.000000000 -0600
@@ -341,7 +341,7 @@
                msg_destroy(msg);
                break;
        }
-       if (msg_type(msg) == sms) {
+       if ((msg_type(msg) == sms) && (msg->sms.sms_type != report_mo)) {
                gw_sql_save_msg(msg, octstr_imm("MO"));
        }
        send_msg(conn->smsbox_connection, conn, msg);
@@ -454,7 +454,7 @@
                        debug("sqlbox", 0, "bearerbox_to_sql: connection to bearerbox died.");
                        break;
                }
-               if (msg_type(msg) == sms) {
+        if ((msg_type(msg) == sms) && (msg->sms.sms_type != report_mo)) {
                        gw_sql_save_msg(msg, octstr_imm("MO"));
                }
                msg_destroy(msg);
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.