[sr-dev] git:3.2: ctl: use SRNAME define to build default ctl file path

Daniel-Constantin Mierla miconda at gmail.com
Thu Nov 3 09:54:26 CET 2011


Module: sip-router
Branch: 3.2
Commit: 233b229e00aa1d1be3a6d9b1484aa2c9ece3407e
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=233b229e00aa1d1be3a6d9b1484aa2c9ece3407e

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Mon Oct 31 17:16:36 2011 +0100

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
(cherry picked from commit b515ac33300f3c1d47195961409812d49fafb58f)

---

 modules/ctl/ctl_defaults.h |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/modules/ctl/ctl_defaults.h b/modules/ctl/ctl_defaults.h
index c50af47..5c10c17 100644
--- a/modules/ctl/ctl_defaults.h
+++ b/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
 




More information about the sr-dev mailing list