Browse Source

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 years ago
parent
commit
b515ac3330
1 changed files with 6 additions and 0 deletions
  1. 6 0
      modules/ctl/ctl_defaults.h

+ 6 - 0
modules/ctl/ctl_defaults.h

@@ -4,7 +4,13 @@
 #ifndef __ctl_defaults_h
 #ifndef __ctl_defaults_h
 #define __ctl_defaults_h
 #define __ctl_defaults_h
 /*listen by default on: */
 /*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"
 #define DEFAULT_CTL_SOCKET  "unixs:/tmp/" NAME "_ctl"
+#endif
 /* port used by default for tcp/udp if no port is explicitely specified */
 /* port used by default for tcp/udp if no port is explicitely specified */
 #define DEFAULT_CTL_PORT 2049
 #define DEFAULT_CTL_PORT 2049