[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:50:54 CEST 2008
El Martes, 12 de Agosto de 2008 09:17, Henning Westerholt escribió:
> Hi Raul,
>
> well, the else case is run if you do not set the use_uri_table, which is
> the default. Then it will check the version of the subscriber table, as
> the default value for db_table is subscriber. So why do you think it will
> not work here? (The code is perhaps a little bit redundant, though.)
The error is that if you set db_table from .cfg but not use_uri_table, it will
fails, so there is only 2 ways of solve that, or explaining it on the docs or
giving away and error if use_uri_db is no set and db_table is different from
the "default" value.
Maybe we have to think a little about how db_checks are done, because what
happens if someone is using a "different" subscriber table?
> Ok, what do you suggest for error handling in C then? I also do not like
> gotos, but think they are better then code duplication for cleanups and
> similar work. But i'll take a look.
What error handling? .. a return -1 ? ... checking other modules I've
found "abuses" of goto use, for example on alias_db module "goto err_server",
5 times on alookup.c, IMHO ONE if statement and ONE log call followed by ONE
return -1 could not be called "error handling".
From my point of view, error handling is when you must close open
files/conections, or take a desition about what to do.
Maybe all this is because I hate spagetti code ..
--
Saludos.
Raúl Alexis Betancor Santana
Dimensión Virtual S.L.
More information about the Devel
mailing list