On 17-03 12:29, Henning Westerholt wrote:
Henning,
any preferences on how to fix this? Carrierroute module in the sip-router
master branch currently does not compile.
Hi Jan,
cr seems to be the only module that use LM_GEN1 with variable argument list,
so probably it make sense to fix it in the module. Patch attached, as my sr
tree behaves strange at the moment. It shows dozens of files as new, which i
don't modified.
Cheers,
Henning
diff --git a/modules/carrierroute/cr_config.c
b/modules/carrierroute/cr_config.c
index 48975a5..f8e587e 100644
--- a/modules/carrierroute/cr_config.c
+++ b/modules/carrierroute/cr_config.c
@@ -50,8 +50,15 @@
* @param ap format arguments
*/
static void conf_error(cfg_t *cfg, const char * fmt, va_list ap) {
- // FIXME this don't seems to work reliable, produces strange error messages
- LM_GEN1(L_ERR, (char *) fmt, ap);
+ char buf[1024];
+
+ if (vsnprintf(buf, sizeof(buf), fmt, ap) < 0) {
See again:
http://lists.kamailio.org/pipermail/devel/2009-March/018219.html
The same applies to vsnprintf.
Jan.