[Kamailio-Devel] SF.net SVN: openser:[4677] trunk/modules/uri_db/uridb_mod.c
Raúl Alexis Betancor Santana
rabs at dimension-virtual.com
Tue Aug 12 10:05:16 CEST 2008
El Lunes, 11 de Agosto de 2008 22:17, Henning Westerholt escribió:
> Revision: 4677
> http://openser.svn.sourceforge.net/openser/?rev=4677&view=rev
> Author: henningw
> Date: 2008-08-11 21:17:08 +0000 (Mon, 11 Aug 2008)
>
> Log Message:
> -----------
> - fix subscriber table version, reported from Rafael Risco Gonzales-Vigil
>
> Modified Paths:
> --------------
> trunk/modules/uri_db/uridb_mod.c
>
I have a doub about uri_db module ... related to bug report 1966153.
Could anyone explain me how the next code runs, from my point of view it's
wrong if you don't set use_uri_table on the .cfg
if (use_uri_table) {
/* Check table version */
ver = uridb_db_ver(&db_url, &db_table);
if (ver < 0) {
LM_ERR("Error while querying table version\n");
goto error;
} else if (ver != URI_TABLE_VERSION) {
LM_ERR("Invalid table version of the uri table\n");
goto error;
}
} else {
/* Check table version */
ver = uridb_db_ver(&db_url, &db_table); <<<<====
if (ver < 0) {
LM_ERR("Error while querying table version\n");
goto error;
} else if (ver != SUBSCRIBER_TABLE_VERSION) { <<<<====
LM_ERR("Invalid table version of the subscriber
table\n");
goto error;
}
}
HOW, in the name of god, is possible that the marked lines runs OK.
Also, pls remove the "goto error" statements, it's an insult to code quality
--
Saludos.
Raúl Alexis Betancor Santana
Dimensión Virtual S.L.
More information about the Devel
mailing list