浏览代码

ctl: use SRNAME define to build default ctl file path

- this define is set by sercmd comilation (NAME is set to sercmd in this
  case)
- otherwise use NAME, which is set by sip server compilation
- reported by Henning Westerholt
Daniel-Constantin Mierla 14 年之前
父节点
当前提交
b515ac3330
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      modules/ctl/ctl_defaults.h

+ 6 - 0
modules/ctl/ctl_defaults.h

@@ -4,7 +4,13 @@
 #ifndef __ctl_defaults_h
 #define __ctl_defaults_h
 /*listen by default on: */
+#ifdef SRNAME
+/* this is used when compiling sercmd tool */
+#define DEFAULT_CTL_SOCKET  "unixs:/tmp/" SRNAME "_ctl"
+#else
+/* this is used when compiling sip server */
 #define DEFAULT_CTL_SOCKET  "unixs:/tmp/" NAME "_ctl"
+#endif
 /* port used by default for tcp/udp if no port is explicitely specified */
 #define DEFAULT_CTL_PORT 2049