Possible BUG in dlr.c (sdb_callbackk_add() CVS)

David Chkhartishvili <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Organization MagtiCom Ltd.
Message-ID <[email protected]>
Hi,

static int sdb_callback_add(int n, char **p, void *row)
{
        if (!n) {
        debug("dlr.sdb", 0, "no rows found");
        return 0;
    }

    /* strip string into words */
    row = octstr_split(octstr_imm(p[0]), octstr_imm(" "));
    if (list_len(row) != 3) {
        debug("dlr.sdb", 0, "Row has wrong length %ld", list_len(row));
        return 0;
    }
          
        return 0;
}




After recompiling CVS tree with sdb support (oracle), I got error from 
sdb_callback_add function: Row has wrong length 1.

For some reasons it only looks for p[0] value, but it only contains 
dlrmask field, p[1] is service type and p[2] is url.
In my case:
p[0] -- 3
p[1] -- 1
p[2] -- http://localhost/dlr.php?type=%d&id=11

Please tell me why we expect that all 3 values are in p[0]?

I created Octstr and unioned all 3 values in it: "3 1 
http://localhost/dlr.php?type=%d&id=1", that value looks reasonable for 
splitting (dlr.c:646).
list_len(row) check went normally (dlr.c:647), but I got: 
gwlib/thread.c:65: mutex_lock_real: Assertion `mutex != NULL' failed.


Any Ideas?

-- 
David Chkhartishvili
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.