From 4d158e6f0d060318f4f0587af3781f1103ecf63b Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Tue, 20 Aug 2019 06:00:47 +0200 Subject: directly discard hnb that failed to register upon connect Change-Id: Ib6883294a4ad990a888db5abb0555b08af49f085 --- src/hnbgw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/hnbgw.c') diff --git a/src/hnbgw.c b/src/hnbgw.c index 3f94a01..dea5c5a 100644 --- a/src/hnbgw.c +++ b/src/hnbgw.c @@ -287,7 +287,7 @@ struct hnb_context *hnb_context_alloc(struct hnb_gw *gw, struct osmo_stream_srv_ ctx->gw = gw; ctx->conn = osmo_stream_srv_create(tall_hnb_ctx, link, new_fd, hnb_read_cb, NULL, ctx); - if (!ctx->conn) { + if (!ctx->conn || (ctx->hnb_register_attempted && !ctx->hnb_registered)) { LOGP(DMAIN, LOGL_INFO, "error while creating connection\n"); talloc_free(ctx); return NULL; -- cgit v1.2.3