libbsc: Create pcu-socket only as specified in config file
Since commit b4999b60d48bcbb5aa575973d068e07ab672e095 we created PCU
sockets at hard-coded paths in the filesystem by default for all BTSs.
This is inflexible and prevents the use of multiple BSC instances on a
single filesystem, or the placement of the sockets in a more secure
location than /tmp.
The new approach with this patch is that
* no PCU sockets are created by default
* only for those BTSs where a 'pcu-socket' is configured via VTY,
the socket will actually be created
Change-Id: Ie9079470584777dcc31f85f9bf0808f479156ccb
Closes: OS#2293
diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h
index 3371fb9..1380a6c 100644
--- a/openbsc/include/openbsc/gsm_data_shared.h
+++ b/openbsc/include/openbsc/gsm_data_shared.h
@@ -870,6 +870,7 @@
struct amr_multirate_conf mr_half;
/* PCU socket state */
+ char *pcu_sock_path;
struct pcu_sock_state *pcu_state;
#endif /* ROLE_BSC */
diff --git a/openbsc/include/openbsc/pcu_if.h b/openbsc/include/openbsc/pcu_if.h
index 0c355b7..1f398b4 100644
--- a/openbsc/include/openbsc/pcu_if.h
+++ b/openbsc/include/openbsc/pcu_if.h
@@ -1,8 +1,6 @@
#ifndef _PCU_IF_H
#define _PCU_IF_H
-#define PCU_SOCK_DEFAULT "/tmp/pcu_bts"
-
#include <osmocom/gsm/l1sap.h>
extern int pcu_direct;