diff options
author | Vadim Yanitskiy <axilirator@gmail.com> | 2018-12-22 04:57:34 +0700 |
---|---|---|
committer | Vadim Yanitskiy <axilirator@gmail.com> | 2018-12-26 20:52:18 +0000 |
commit | e9bc2ae6710f23f9442cb5ec2dbae6768c852eab (patch) | |
tree | 8445ab46c03f38e3ead833d59b7d53ae40282b71 /src/host/layer23/src | |
parent | f01dc598a03fae597935efc4bbd89cad45ae58bb (diff) |
layer23/sap_interface.c: remove redundant socket_path argument
Change-Id: I408b3e1fa40e9b5daf88fa6ed5f3930b83dffe6f
Diffstat (limited to 'src/host/layer23/src')
-rw-r--r-- | src/host/layer23/src/common/sap_interface.c | 7 | ||||
-rw-r--r-- | src/host/layer23/src/mobile/subscriber.c | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/host/layer23/src/common/sap_interface.c b/src/host/layer23/src/common/sap_interface.c index b436c750..7a422333 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 7f24d56f..b2be5549 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"); |