diff options
Diffstat (limited to 'src/hnbgw.c')
-rw-r--r-- | src/hnbgw.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/hnbgw.c b/src/hnbgw.c index 752fc0f..af490b5 100644 --- a/src/hnbgw.c +++ b/src/hnbgw.c @@ -283,6 +283,17 @@ void hnb_context_release(struct hnb_context *ctx) talloc_free(ctx); } +struct hnb_context *hnb_context_find_by_cid(struct hnb_gw *gw, uint32_t cid) +{ + struct hnb_context *ctx; + + llist_for_each_entry(ctx, &gw->hnb_list, list) { + if (ctx->id.cid == cid) + return ctx; + } + return NULL; +} + /*! call-back when the listen FD has something to read */ static int accept_cb(struct osmo_stream_srv_link *srv, int fd) { |