pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/39146?usp=email )
Change subject: cbsp_link: set name on stream ......................................................................
cbsp_link: set name on stream
Otherwise it's difficult to identify it in logs eg. during reconnect.
Change-Id: Ia0873ea26a4ef5678fc571e40391d04a2757a7bc --- M src/osmo-bsc/cbsp_link.c 1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/46/39146/1
diff --git a/src/osmo-bsc/cbsp_link.c b/src/osmo-bsc/cbsp_link.c index 9e17ef3..3a86ea3 100644 --- a/src/osmo-bsc/cbsp_link.c +++ b/src/osmo-bsc/cbsp_link.c @@ -121,6 +121,7 @@ osmo_sock_get_name2(fd)); return -1; } + osmo_stream_srv_set_name(srv, "cbsp"); osmo_stream_srv_set_read_cb(srv, cbsp_srv_read_cb); osmo_stream_srv_set_closed_cb(srv, cbsp_srv_closed_cb); osmo_stream_srv_set_segmentation_cb(srv, osmo_cbsp_segmentation_cb); @@ -240,6 +241,8 @@ OSMO_SOCKADDR_STR_FMT_ARGS(&cbc->client.remote_addr)); if (!cbc->client.cli) { cbc->client.cli = osmo_stream_cli_create(cbc); + OSMO_ASSERT(cbc->client.cli); + osmo_stream_cli_set_name(cbc->client.cli, "cbsp"); osmo_stream_cli_set_data(cbc->client.cli, cbc); osmo_stream_cli_set_connect_cb(cbc->client.cli, cbsp_client_connect_cb); osmo_stream_cli_set_disconnect_cb(cbc->client.cli, cbsp_client_disconnect_cb); @@ -273,6 +276,8 @@ if (!cbc->server.link) { LOGP(DCBS, LOGL_NOTICE, "Creating CBSP Server\n"); cbc->server.link = osmo_stream_srv_link_create(cbc); + OSMO_ASSERT(cbc->server.link); + osmo_stream_srv_link_set_name(cbc->server.link, "cbsp"); osmo_stream_srv_link_set_data(cbc->server.link, cbc); osmo_stream_srv_link_set_accept_cb(cbc->server.link, cbsp_srv_link_accept_cb);