Hi,

I just tried to use sqlite and htable to load and save the values.
At start I can see in the log, that all parameters are correct and that htable want to load the values from the table.
No errors.

But if I stop kamailio, nothing is written to the tables.

At start I can see:

kamailio[]: DEBUG: <core> [core/modparam.c:112]: set_mod_param_regex(): 'htable' matches module 'htable' kamailio[]: DEBUG: <core> [core/sr_module.c:814]: find_param_export(): found <htable> in module htable [/usr/lib/x86_64-linux-gnu/kamailio/modules/htable.so] kamailio[]: DEBUG: <core> [core/modparam.c:128]: set_mod_param_regex(): found <htable> in module htable [/usr/lib/x86_64-linux-gnu/kamailio/modules/htable.so] kamailio[]: DEBUG: htable [ht_api.c:1046]: ht_table_spec(): htable [callpush] - dbmode [1] kamailio[]: DEBUG: htable [ht_api.c:1027]: ht_table_spec(): htable [callpush] - dbtable [userpush] kamailio[]: DEBUG: htable [ht_api.c:1036]: ht_table_spec(): htable [callpush] - expire [86400] kamailio[]: DEBUG: htable [ht_api.c:1041]: ht_table_spec(): htable [callpush] - size [10]



kamailio[]: DEBUG: htable [ht_api.c:1084]: ht_db_load_tables(): loading db table [userpush] in ht [userpush] kamailio[]: DEBUG: htable [ht_db.c:232]: ht_db_load_table(): =============== loading hash table [userpush] from database [userpush] kamailio[]: DEBUG: db_sqlite [dbase.c:223]: db_sqlite_submit_query(): submit_query: select key_name,key_type,value_type,key_value from userpush  order by key_name kamailio[]: DEBUG: <core> [db_query.c:72]: db_do_submit_query(): submitted query: select key_name,key_type,value_type,key_value from userpush  order by key_name, result 0 kamailio[]: DEBUG: <core> [db_res.c:119]: db_new_result(): allocate 56 bytes for result set at 0x7f4882107938 kamailio[]: DEBUG: <core> [db_res.c:79]: db_free_columns(): freeing 0 columns kamailio[]: DEBUG: <core> [db_res.c:138]: db_free_result(): freeing result set at 0x7f4882107938

Ok, the file is empty, but it tries to load the data from the table.

The table looks like:

sqlite> .schema userpush
CREATE TABLE userpush (
        key_name TEXT,
        "key_type" INTEGER,
        value_type INTEGER,
        key_value TEXT
);


I checked the source code and I saw that destroy() should be called.
Inside is ht_db_open_con() called before ht_db_sync_tables(), were it happens.
But I can even not see the debug message from ht_db_open_con() :

LM_DBG("database connection opened successfully\n")
and also not
LM_ERR("failed to connect to the database\n");

For me it looks like, that the destroy() function is not called.

Even with debug=3, I can only see:


systemd[]: Stopping kamailio.service - Kamailio - the Open Source SIP Server...
kamailio[]: INFO: <core> [main.c:854]: sig_usr(): signal 15 received
systemd[]: kamailio.service: Deactivated successfully.
systemd[]: Stopped kamailio.service - Kamailio - the Open Source SIP Server.

I stopped kamailio with

systemctl stop kamailio

I'm sure that something was inside the htable before I stoped kamailio:

{
        entry: 0
        size: 1
        slot: {
                {
                        name: 07db580a6c13e798a5acc0d123d6e957897c8650b43f99d6d5cb9c2cb5ba4fa4                         value: 3a28dcb73eb65722df5a261983b7692cecdca482bf8725032e46a0c6b89fb355
                        type: str
                }
        }
}

Any further ideas?

Best regards,

Bernd



__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:

Reply via email to