bsc: Implement sending a message toward the MSC.

This commit is contained in:
Holger Hans Peter Freyther
2010-11-06 23:35:02 +01:00
parent c97d9b4df1
commit ca5c022a32

View File

@@ -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) 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); msgb_free(msg);
return 0; return 0;
} }