diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-11-06 23:35:02 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-11-15 20:06:49 +0100 |
commit | ca5c022a3278194ba4a1d8235a31e7cc94f12f42 (patch) | |
tree | 5ae0b0bdd59a7f62484ade082a090e626ed2180d /openbsc/src/bsc | |
parent | c97d9b4df1f782a86adc5cad15373b6dc4c7ebd6 (diff) |
bsc: Implement sending a message toward the MSC.
Diffstat (limited to 'openbsc/src/bsc')
-rw-r--r-- | openbsc/src/bsc/osmo_bsc_sccp.c | 10 |
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; } |