Commit Graph

8 Commits

Author SHA1 Message Date
Neels Hofmeyr 73828152d9 enable ctrl bind config for various programs
Add ctrl_vty_init() calls and feed the ctrl_vty_get_bind_addr() return value to
ctrl_interface_setup() in the following programs:

  osmo-bsc
  osmo-bsc_nat
  osmo-nitb
  osmo-sgsn

For osmo-sgsn, move the control interface setup invocation below the config
parsing, so that the ctrl_vty_get_bind_addr() can return the configured
address.
2016-02-25 12:18:04 +01:00
Harald Welte e263187a36 Fix bsc_ctrl_node_lookup after libctrl changes
As bsc_ctrl_node_lookup() is called for each iteration,
the variables 'bts' and 'trx' are no longer static accross multiple
calls, which means we need a different way to determine if we are in the
right node while matching for a trx or a ts.
2014-08-21 18:26:36 +02:00
Harald Welte 74d4adcbba libctrl: Follow rename of controlif_setup -> ctrl_interface_setup 2014-08-21 15:34:28 +02:00
Harald Welte 02cc2b668a libctrl: Move bulk of node lookup code into libosmocore
Now that the bulk of the control interface node lookup has
no reference to the BSC specific data structures, we are
moving it into libosmocore.

A control interface user now only registers an optional small
node lookup function like bsc_ctrl_node_lookup()
2014-08-21 15:34:28 +02:00
Harald Welte a67455f8d8 ctrl_if: Split bsc_ctrl_cmd_handle() in two parts
The idea here is that bsc_ctrl_cmd_handle now has no dependency
at all to the BSC related data structures and thus can actually become
part of libctrl.

The new function bsc_ctrl_node_lookup however will remain bsc-specific.
2014-08-21 15:34:28 +02:00
Harald Welte ba874b82be move libctrl from openbsc to libosmoctrl (libosmocore.git) 2014-08-21 15:34:28 +02:00
Jacob Erlbeck 268b2e6544 ctrl: Fix handling of missing replies
Currently, if a CTRL method does not set the reply, an error is
logged ("cmd->reply has not been set"). It even complains when the
function implementing the command returns CTRL_CMD_HANDLED, where
a reply text is not needed.

This patch changes the logging level from ERROR to NOTICE. The logging
is now only done, when the retry has not been set and the
implementation returns either CTRL_CMD_ERROR or CTRL_CMD_REPLY. So
in these cases the reply field must be set.

This fixes the generation of log messages when doing NAT ctrl command
forwarding.

Ticket: OW#1177
Sponsored-by: On-Waves ehf
2014-05-15 14:22:56 +02:00
Holger Hans Peter Freyther 49f9e5b6b4 ctrl: Move the lookup into a separate file in preparation for GPRS
For GPRS the look-up via bts/trx does not make any sense and would
introduce bad depdencies for the SGSN. Move the look-up code to a
new file and introduce new setup methods.
2014-03-23 16:25:16 +01:00