[S] Change in libosmo-netif[master]: stream: Remove duplicated code in osmo_stream_cli_create()
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/33328 ) Change subject: stream: Remove duplicated code in osmo_stream_cli_create() ...................................................................... stream: Remove duplicated code in osmo_stream_cli_create() Simply call osmo_stream_cli_create2() with name "" Change-Id: I0652361a6bdf194545f36edc5e12e5d26798163a --- M src/stream.c 1 file changed, 12 insertions(+), 17 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/stream.c b/src/stream.c index d46bc78..2ba4cde 100644 --- a/src/stream.c +++ b/src/stream.c @@ -552,23 +552,7 @@ */ struct osmo_stream_cli *osmo_stream_cli_create(void *ctx) { - struct osmo_stream_cli *cli; - - cli = talloc_zero(ctx, struct osmo_stream_cli); - if (!cli) - return NULL; - - cli->name = ""; - cli->mode = OSMO_STREAM_MODE_UNKNOWN; - cli->sk_domain = AF_UNSPEC; - cli->sk_type = SOCK_STREAM; - cli->proto = IPPROTO_TCP; - cli->state = STREAM_CLI_STATE_CLOSED; - osmo_timer_setup(&cli->timer, cli_timer_cb, cli); - cli->reconnect_timeout = 5; /* default is 5 seconds. */ - INIT_LLIST_HEAD(&cli->tx_queue); - - return cli; + return osmo_stream_cli_create2(ctx, ""); } static void stream_cli_iofd_read_cb(struct osmo_io_fd *iofd, int res, struct msgb *msg) -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/33328 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I0652361a6bdf194545f36edc5e12e5d26798163a Gerrit-Change-Number: 33328 Gerrit-PatchSet: 1 Gerrit-Owner: daniel <dwillmann@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge@osmocom.org> Gerrit-MessageType: merged
participants (1)
-
laforge