Module: kamailio
Branch: master
Commit: 06cc2560e5358468178ef3e5c795a8a0ec67b693
URL:
https://github.com/kamailio/kamailio/commit/06cc2560e5358468178ef3e5c795a8a…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2024-12-10T23:58:06+01:00
db_sqlite: fix incompatible-pointer-types warning
fixes #4064
---
Modified: src/modules/db_sqlite/dbase.c
---
Diff:
https://github.com/kamailio/kamailio/commit/06cc2560e5358468178ef3e5c795a8a…
Patch:
https://github.com/kamailio/kamailio/commit/06cc2560e5358468178ef3e5c795a8a…
---
diff --git a/src/modules/db_sqlite/dbase.c b/src/modules/db_sqlite/dbase.c
index 77b4fc3bc32..dd2030d2e43 100644
--- a/src/modules/db_sqlite/dbase.c
+++ b/src/modules/db_sqlite/dbase.c
@@ -142,14 +142,17 @@ db1_con_t *db_sqlite_init(const str *_url)
* No function should be called after this
*/
-static void db_sqlite_free_connection(struct sqlite_connection *con)
+static void db_sqlite_free_connection(struct pool_con *con)
{
+ struct sqlite_connection *_c;
+
if(!con)
return;
+ _c = (struct sqlite_connection *)con;
- sqlite3_close(con->conn);
- free_db_id(con->hdr.id);
- pkg_free(con);
+ sqlite3_close(_c->conn);
+ free_db_id(_c->hdr.id);
+ pkg_free(_c);
}
void db_sqlite_close(db1_con_t *_h)