Hi Daniel-Constantin!

little fix for short name in syslog's log:

-before
Jun 19 14:40:37 phoenix-c2 /usr/local/sbin/kamailio[63542]: WARNING: qm_status: 
(0x801000000):
-after
Jun 19 14:41:44 phoenix-c2 kamailio[91432]: WARNING: qm_status: heap size= 
33554432

patch attached


--
 WBR, Victor
  JID: coy...@bks.tv
  JID: coy...@bryansktel.ru
  I use FREE operation system: 3.9.4-calculate GNU/Linux
diff --git a/main.c b/main.c
index 05f45b5..664230b 100644
--- a/main.c
+++ b/main.c
@@ -189,6 +189,7 @@
 #include "pv_core.h" /* register core pvars */
 #include "ppcfg.h"
 #include "sock_ut.h"
+#include <libgen.h>
 
 #ifdef DEBUG_DMALLOC
 #include <dmalloc.h>
@@ -2445,7 +2446,7 @@ try_again:
 	}
 #endif /* USE_SCTP */
 	/* init_daemon? */
-	if( !dont_fork && daemonize((log_name==0)?argv[0]:log_name, 1) < 0)
+	if( !dont_fork && daemonize((log_name==0)?basename(argv[0]):log_name, 1) < 0)
 		goto error;
 	if (install_sigs() != 0){
 		fprintf(stderr, "ERROR: could not install the signal handlers\n");
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to