aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libbsc
diff options
context:
space:
mode:
Diffstat (limited to 'openbsc/src/libbsc')
-rw-r--r--openbsc/src/libbsc/bsc_msc.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/openbsc/src/libbsc/bsc_msc.c b/openbsc/src/libbsc/bsc_msc.c
index 829ee2b54..e373679c1 100644
--- a/openbsc/src/libbsc/bsc_msc.c
+++ b/openbsc/src/libbsc/bsc_msc.c
@@ -158,6 +158,9 @@ int bsc_msc_connect(struct bsc_msc_connection *con)
return -1;
}
+ /* TODO: Why are we not using the libosmocore soecket
+ * abstraction, or libosmo-netif? */
+
/* move to the next connection */
dest = (struct bsc_msc_dest *) con->dests->next;
llist_del(&dest->list);
@@ -197,7 +200,10 @@ int bsc_msc_connect(struct bsc_msc_connection *con)
sin.sin_port = htons(dest->port);
inet_aton(dest->ip, &sin.sin_addr);
- setsockopt(fd->fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on));
+ ret = setsockopt(fd->fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on));
+ if (ret != 0)
+ LOGP(DMSC, LOGL_ERROR,
+ "Failed to set SO_REUSEADDR socket option\n");
ret = connect(fd->fd, (struct sockaddr *) &sin, sizeof(sin));
if (ret == -1 && errno == EINPROGRESS) {