bsc: Implement sending a message toward the MSC.
diff --git a/openbsc/src/bsc/osmo_bsc_sccp.c b/openbsc/src/bsc/osmo_bsc_sccp.c
index f7f30e1..b397b09 100644
--- a/openbsc/src/bsc/osmo_bsc_sccp.c
+++ b/openbsc/src/bsc/osmo_bsc_sccp.c
@@ -115,7 +115,15 @@
 
 int bsc_queue_for_msc(struct gsm_subscriber_connection *conn, struct msgb *msg)
 {
-	LOGP(DMSC, LOGL_ERROR, "Sending SCCP messages is not yet implemented.\n");
+	struct sccp_connection *sccp = conn->sccp_con->sccp;
+
+	if (sccp->connection_state != SCCP_CONNECTION_STATE_ESTABLISHED) {
+		LOGP(DMSC, LOGL_ERROR, "The connection is not established.\n");
+		msgb_free(msg);
+		return -1;
+	}
+
+	sccp_connection_write(sccp, msg);
 	msgb_free(msg);
 	return 0;
 }