summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2018-12-22 04:57:34 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2018-12-26 20:52:18 +0000
commite9bc2ae6710f23f9442cb5ec2dbae6768c852eab (patch)
tree8445ab46c03f38e3ead833d59b7d53ae40282b71 /src
parentf01dc598a03fae597935efc4bbd89cad45ae58bb (diff)
layer23/sap_interface.c: remove redundant socket_path argument
Diffstat (limited to 'src')
-rw-r--r--src/host/layer23/include/osmocom/bb/common/sap_interface.h2
-rw-r--r--src/host/layer23/src/common/sap_interface.c7
-rw-r--r--src/host/layer23/src/mobile/subscriber.c2
3 files changed, 6 insertions, 5 deletions
diff --git a/src/host/layer23/include/osmocom/bb/common/sap_interface.h b/src/host/layer23/include/osmocom/bb/common/sap_interface.h
index e2aad3f..e78320e 100644
--- a/src/host/layer23/include/osmocom/bb/common/sap_interface.h
+++ b/src/host/layer23/include/osmocom/bb/common/sap_interface.h
@@ -2,7 +2,7 @@
typedef int (*osmosap_cb_t)(struct msgb *msg, struct osmocom_ms *ms);
-int sap_open(struct osmocom_ms *ms, const char *socket_path);
+int sap_open(struct osmocom_ms *ms);
int sap_close(struct osmocom_ms *ms);
int osmosap_send_apdu(struct osmocom_ms *ms, uint8_t *data, uint16_t length);
int osmosap_register_handler(struct osmocom_ms *ms, osmosap_cb_t cb);
diff --git a/src/host/layer23/src/common/sap_interface.c b/src/host/layer23/src/common/sap_interface.c
index b436c75..7a42233 100644
--- a/src/host/layer23/src/common/sap_interface.c
+++ b/src/host/layer23/src/common/sap_interface.c
@@ -502,14 +502,15 @@ static int sap_apdu(struct osmocom_ms *ms, uint8_t *data, uint16_t len)
return 0;
}
-int sap_open(struct osmocom_ms *ms, const char *socket_path)
+int sap_open(struct osmocom_ms *ms)
{
ssize_t rc;
- rc = osmo_sock_unix_init_ofd(&ms->sap_wq.bfd, SOCK_STREAM, 0, socket_path, OSMO_SOCK_F_CONNECT);
+ rc = osmo_sock_unix_init_ofd(&ms->sap_wq.bfd, SOCK_STREAM, 0,
+ ms->settings.sap_socket_path, OSMO_SOCK_F_CONNECT);
if (rc < 0) {
LOGP(DSAP, LOGL_ERROR, "Failed to create unix domain socket %s: %s\n",
- socket_path, strerror(-rc));
+ ms->settings.sap_socket_path, strerror(-rc));
ms->sap_entity.sap_state = SAP_SOCKET_ERROR;
return rc;
}
diff --git a/src/host/layer23/src/mobile/subscriber.c b/src/host/layer23/src/mobile/subscriber.c
index 7f24d56..b2be554 100644
--- a/src/host/layer23/src/mobile/subscriber.c
+++ b/src/host/layer23/src/mobile/subscriber.c
@@ -1282,7 +1282,7 @@ int gsm_subscr_sapcard(struct osmocom_ms *ms)
/* Try to connect to the SAP interface */
vty_notify(ms, NULL);
vty_notify(ms, "Connecting to the SAP interface...\n");
- rc = sap_open(ms, ms->settings.sap_socket_path);
+ rc = sap_open(ms);
if (rc < 0) {
LOGP(DSAP, LOGL_ERROR, "Failed during sap_open(), no SAP based SIM reader\n");
vty_notify(ms, "SAP connection error!\n");