From 82a8d6e3931dea7f127f84e9f6c4102d858410da Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Wed, 24 Mar 2010 10:45:07 +0100 Subject: Specify a release reason for the lchan In case the put_lchan is making the refcount drop to zero use the release reason specified in the put_lchan call. This is used by the BSC MSC IP implementation for the assignment handling where the old channel is getting closed with a local end release (1). --- openbsc/src/bssap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'openbsc/src/bssap.c') diff --git a/openbsc/src/bssap.c b/openbsc/src/bssap.c index a6a1d8028..f1b5bab7a 100644 --- a/openbsc/src/bssap.c +++ b/openbsc/src/bssap.c @@ -191,10 +191,10 @@ static int bssmap_handle_clear_command(struct sccp_connection *conn, /* we might got killed during an assignment */ if (msg->lchan->msc_data->secondary_lchan) - put_lchan(msg->lchan->msc_data->secondary_lchan); + put_lchan(msg->lchan->msc_data->secondary_lchan, 0); msg->lchan->msc_data = NULL; - put_lchan(msg->lchan); + put_lchan(msg->lchan, 0); } /* send the clear complete message */ @@ -439,13 +439,13 @@ static void continue_new_assignment(struct gsm_lchan *new_lchan) { if (!new_lchan->msc_data) { LOGP(DMSC, LOGL_ERROR, "No BSS data found.\n"); - put_lchan(new_lchan); + put_lchan(new_lchan, 0); return; } if (new_lchan->msc_data->secondary_lchan != new_lchan) { LOGP(DMSC, LOGL_ERROR, "This is not the secondary channel?\n"); - put_lchan(new_lchan); + put_lchan(new_lchan, 0); return; } -- cgit v1.2.3