aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/bsc
diff options
context:
space:
mode:
Diffstat (limited to 'openbsc/src/bsc')
-rw-r--r--openbsc/src/bsc/osmo_bsc_sccp.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/openbsc/src/bsc/osmo_bsc_sccp.c b/openbsc/src/bsc/osmo_bsc_sccp.c
index f7f30e10d..b397b095e 100644
--- a/openbsc/src/bsc/osmo_bsc_sccp.c
+++ b/openbsc/src/bsc/osmo_bsc_sccp.c
@@ -115,7 +115,15 @@ static int msc_sccp_read(struct msgb *msgb, unsigned int length, void *data)
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;
}