From 1238cc64d79308c3db46baa7f755f17ac3db9e49 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Wed, 20 Aug 2014 19:50:04 +0200 Subject: libctrl: remove openbsc headers, convert from make_sock to libosmocore --- src/ctrl/control_cmd.c | 4 +--- src/ctrl/control_if.c | 24 ++++++++---------------- 2 files changed, 9 insertions(+), 19 deletions(-) (limited to 'src/ctrl') diff --git a/src/ctrl/control_cmd.c b/src/ctrl/control_cmd.c index 44cfa485..45e517db 100644 --- a/src/ctrl/control_cmd.c +++ b/src/ctrl/control_cmd.c @@ -29,9 +29,7 @@ #include #include -#include -#include -#include +#include #include #include diff --git a/src/ctrl/control_if.c b/src/ctrl/control_if.c index 156a24f6..7ce8bf60 100644 --- a/src/ctrl/control_if.c +++ b/src/ctrl/control_if.c @@ -38,31 +38,21 @@ #include #include -#include -#include -#include -#include -#include -#include -#include - -#include -#include +#include +#include #include #include #include #include #include +#include -#include +#include #include #include -#include -#include - vector ctrl_node_vec; /* Send command to all */ @@ -551,8 +541,10 @@ struct ctrl_handle *controlif_setup(struct gsm_network *gsmnet, uint16_t port, goto err; /* Listen for control connections */ - ret = make_sock(&ctrl->listen_fd, IPPROTO_TCP, INADDR_LOOPBACK, port, - 0, listen_fd_cb, ctrl); + ctrl->listen_fd.cb = listen_fd_cb; + ctrl->listen_fd.data = ctrl; + ret = osmo_sock_init_ofd(&ctrl->listen_fd, AF_INET, SOCK_STREAM, IPPROTO_TCP, + "127.0.0.1", port, OSMO_SOCK_F_BIND); if (ret < 0) goto err_vec; -- cgit v1.2.3