Closed #471.
---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/issues/471#event-287277064___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
Confirmed that @ionutrazvanionita fixed the issue. Thanks!
---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/issues/471#issuecomment-95189643___
Devel mailing list
Devel@lists.opensips.org
fixed 0b6402c
---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/issues/471#issuecomment-95179737___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
(I've never used opensips, and I haven't done any C coding in a decade.)
It seems to me that `new_db_id` takes a `str*` and assigns it to the `char*
url` member of a `db_id` struct. However, the `str*` relies on its `len`
member, but the `url` member assumes a null-terminated string. When the
So digging into it more, I guess print is just looking for a terminating
character \0, but still what is passed to sqlite3 for its call to openDatabase
includes an extra byte on the end and that's whats causing the problem:
119274 in sqlite3.c
@jarrodb , do you have the version table created in your DB ? as the drouting
module is looking into it to check the versions of the dr related tables.
---
Reply to this email directly or view it on GitHub:
Absolutely, every other module finds its version properly and the SQLite query
built (query_holder) runs successfully on my database.
However, the real problem is its trying to access the wrong SQLite path as
noted by the newly created file in the same path as my actual database when the
Thanks for the help ionut, here is the gdb output from drouting.c as we
discussed in IRC:
```
Breakpoint 1, dr_init () at drouting.c:1176
1176if( head_start-db_url.s == 0 ) {
(gdb) n
1180memcpy( head_start-db_url.s, db_url.s, db_url.len );
(gdb) print
@jarrodb https://gist.github.com/ionutrazvanionita/5f09ec2d96ddc60f6695 this
patch fixes the bad '\0' issue.
---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/issues/471#issuecomment-94515788___
Devel mailing
# opensips.cfg
```
# - drouting -
modparam(drouting, db_url, sqlite://var/db/opensips)
```
# opensips.log
```
Apr 18 15:39:39 localhost opensips: INFO:drouting:dr_init: Dynamic-Routing -
initializing
Apr 18 15:39:39 localhost opensips: ERROR:db_sqlite:db_sqlite_query: failed to
10 matches
Mail list logo