Commit Graph

5 Commits

Author SHA1 Message Date
Neels Hofmeyr a829b45c85 use osmo_init_logging2() with proper talloc ctx
Ironically, when deprecating osmo_init_logging() in
I216837780e9405fdaec8059c63d10699c695b360, I forgot to change the callers
within libosmocore itself, i.e. in the various regression tests.

Change-Id: Ia36c248f99353d5baaa2533f46a2f60a8579bdf8
2018-04-06 04:37:50 +02:00
Neels Hofmeyr 1f82d0aecf osmo_sock_get_name(): clearly indicate local and remote
In a string like

  127.0.0.1:2905<->127.0.0.1:60661

it is hard to tell which is the local part. I'd have expected it on the left,
but it is actually on the right.

To avoid doubt and bypass bikesheds on which side should be what, clearly mark
the two sides as remote and local.

  (r=127.0.0.1:2905<->l=127.0.0.1:60661)

Change-Id: I43dcc6a1906429bd0955fd7fe2eb5b8495b592d8
2017-07-03 17:29:05 +00:00
Harald Welte dda70fca79 Add osmo_sock_init2() function, allowing both BIND *and* CONNECT
The old osmo_sock_init() function allows only either a bind (for a
server socket), or a connect (for a client socket), but not both
together.  So there's no way to have a client socket that is bound to a
specific local IP and/or port, which is needed for some use cases.

Change-Id: Idab124bcca47872f55311a82d6818aed590965e6
2017-04-09 21:46:21 +02:00
Philipp Maier 6f0f560eab cosmetic: replace fprintf with LOGP
socket.c still uses fprintf to output error messages. This commit
replaces the fprintf with proper LOGP messages.

Change-Id: Ia2993415d5f5c33ccd719af239ff59252d11b764
2017-02-09 16:21:01 +01:00
Harald Welte 4ffb43f654 Add minimal testing of socket.c helper functions
Change-Id: I2773b3859a206f96fb8fa095d50a653d9eeb8d79
2017-02-08 18:23:06 +01:00