This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Harald Welte gerrit-no-reply at lists.osmocom.orgHarald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/11349 Change subject: server_conn_fsm_alloc(): add explicit talloc context argument ...................................................................... server_conn_fsm_alloc(): add explicit talloc context argument The rspro_server_conn might be a static member of a different struct and hence not suitable as a talloc context. Change-Id: I9fd78d558f791d452f2a5279f1af13fd596c1cd6 --- M src/client.h M src/remsim_client_fsm.c 2 files changed, 4 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/49/11349/1 diff --git a/src/client.h b/src/client.h index 7a3c476..d85e647 100644 --- a/src/client.h +++ b/src/client.h @@ -37,6 +37,7 @@ uint16_t server_port; }; +int server_conn_fsm_alloc(void *ctx, struct rspro_server_conn *srvc); extern struct osmo_fsm remsim_client_server_fsm; /* main.c */ diff --git a/src/remsim_client_fsm.c b/src/remsim_client_fsm.c index 84f9f4f..8711934 100644 --- a/src/remsim_client_fsm.c +++ b/src/remsim_client_fsm.c @@ -302,7 +302,7 @@ struct rspro_server_conn *srvc = (struct rspro_server_conn *) fi->priv; int rc; - srvc->conn = ipa_client_conn_create(srvc, NULL, 0, srvc->server_host, srvc->server_port, + srvc->conn = ipa_client_conn_create(fi, NULL, 0, srvc->server_host, srvc->server_port, srvc_updown_cb, srvc_read_cb, NULL, srvc); if (!srvc->conn) { fprintf(stderr, "Unable to create socket: %s\n", strerror(errno)); @@ -450,11 +450,11 @@ .event_names = server_conn_fsm_event_names, }; -int server_conn_fsm_alloc(struct rspro_server_conn *srvc) +int server_conn_fsm_alloc(void *ctx, struct rspro_server_conn *srvc) { struct osmo_fsm_inst *fi; - fi = osmo_fsm_inst_alloc(&remsim_client_server_fsm, srvc, srvc, LOGL_DEBUG, "server"); + fi = osmo_fsm_inst_alloc(&remsim_client_server_fsm, ctx, srvc, LOGL_DEBUG, "server"); if (!fi) return -1; -- To view, visit https://gerrit.osmocom.org/11349 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I9fd78d558f791d452f2a5279f1af13fd596c1cd6 Gerrit-Change-Number: 11349 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte <laforge at gnumonks.org> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181014/b3239ebf/attachment.htm>