bsc_api: Move some parts over to the BSC API.
diff --git a/openbsc/src/bsc_api.c b/openbsc/src/bsc_api.c
index b504752..070606d 100644
--- a/openbsc/src/bsc_api.c
+++ b/openbsc/src/bsc_api.c
@@ -1,6 +1,7 @@
 /* GSM 08.08 like API for OpenBSC. The bridge from MSC to BSC */
 
 /* (C) 2010 by Holger Hans Peter Freyther
+ * (C) 2009 by Harald Welte <laforge@gnumonks.org>
  *
  * All Rights Reserved
  *
@@ -31,3 +32,22 @@
 	msg->trx = msg->lchan->ts->trx;
 	return rsl_data_request(msg, link_id);
 }
+
+/* dequeue messages to layer 4 */
+int bsc_upqueue(struct gsm_network *net)
+{
+	struct gsm_mncc *mncc;
+	struct msgb *msg;
+	int work = 0;
+
+	if (net)
+		while ((msg = msgb_dequeue(&net->upqueue))) {
+			mncc = (struct gsm_mncc *)msg->data;
+			if (net->mncc_recv)
+				net->mncc_recv(net, mncc->msg_type, mncc);
+			work = 1; /* work done */
+			talloc_free(msg);
+		}
+
+	return work;
+}
diff --git a/openbsc/src/gsm_04_08.c b/openbsc/src/gsm_04_08.c
index b17e1da..ed2b4e5 100644
--- a/openbsc/src/gsm_04_08.c
+++ b/openbsc/src/gsm_04_08.c
@@ -2908,25 +2908,6 @@
 	return rc;
 }
 
-/* dequeue messages to layer 4 */
-int bsc_upqueue(struct gsm_network *net)
-{
-	struct gsm_mncc *mncc;
-	struct msgb *msg;
-	int work = 0;
-
-	if (net)
-		while ((msg = msgb_dequeue(&net->upqueue))) {
-			mncc = (struct gsm_mncc *)msg->data;
-			if (net->mncc_recv)
-				net->mncc_recv(net, mncc->msg_type, mncc);
-			work = 1; /* work done */
-			talloc_free(msg);
-		}
-
-	return work;
-}
-
 /*
  * This will be ran by the linker when loading the DSO. We use it to
  * do system initialization, e.g. registration of signal handlers.