summaryrefslogtreecommitdiffstats
path: root/src/sccp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sccp.c')
-rw-r--r--src/sccp.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/sccp.c b/src/sccp.c
index 97e19bd..9a988de 100644
--- a/src/sccp.c
+++ b/src/sccp.c
@@ -47,7 +47,7 @@ const struct sockaddr_sccp sccp_ssn_bssap = {
struct sccp_system {
/* layer3 -> layer2 */
- void (*write_data)(struct msgb *data, void *context);
+ void (*write_data)(struct sccp_connection *conn, struct msgb *data, void *context);
void *write_context;
};
@@ -93,9 +93,9 @@ static struct sccp_data_callback *_find_ssn(uint8_t ssn)
}
-static void _send_msg(struct msgb *msg)
+static void _send_msg(struct sccp_connection *conn, struct msgb *msg)
{
- sccp_system.write_data(msg, sccp_system.write_context);
+ sccp_system.write_data(conn, msg, sccp_system.write_context);
}
/*
@@ -558,7 +558,7 @@ static int _sccp_send_data(int class, const struct sockaddr_sccp *in,
if (!msg)
return -1;
- _send_msg(msg);
+ _send_msg(NULL, msg);
return 0;
}
@@ -685,7 +685,7 @@ static int _sccp_send_refuse(struct sccp_source_reference *src_ref, int cause)
if (!msgb)
return -1;
- _send_msg(msgb);
+ _send_msg(NULL, msgb);
return 0;
}
@@ -732,7 +732,7 @@ static int _sccp_send_connection_confirm(struct sccp_connection *connection)
if (!response)
return -1;
- _send_msg(response);
+ _send_msg(connection, response);
_sccp_set_connection_state(connection, SCCP_CONNECTION_STATE_ESTABLISHED);
return 0;
}
@@ -790,7 +790,7 @@ static int _sccp_send_connection_request(struct sccp_connection *connection,
llist_add_tail(&connection->list, &sccp_connections);
_sccp_set_connection_state(connection, SCCP_CONNECTION_STATE_REQUEST);
- _send_msg(request);
+ _send_msg(connection, request);
return 0;
}
@@ -838,7 +838,7 @@ static int _sccp_send_connection_data(struct sccp_connection *conn, struct msgb
if (!msgb)
return -1;
- _send_msg(msgb);
+ _send_msg(conn, msgb);
return 0;
}
@@ -861,7 +861,7 @@ static int _sccp_send_connection_it(struct sccp_connection *conn)
it->sequencing[0] = it->sequencing[1] = 0;
it->credit = 0;
- _send_msg(msgb);
+ _send_msg(conn, msgb);
return 0;
}
@@ -906,7 +906,7 @@ static int _sccp_send_connection_released(struct sccp_connection *conn, int caus
return -1;
_sccp_set_connection_state(conn, SCCP_CONNECTION_STATE_RELEASE);
- _send_msg(msg);
+ _send_msg(conn, msg);
return 0;
}
@@ -1066,7 +1066,7 @@ static int _sccp_send_connection_release_complete(struct sccp_connection *connec
memcpy(&rlc->source_local_reference,
&connection->source_local_reference, sizeof(struct sccp_source_reference));
- _send_msg(msgb);
+ _send_msg(connection, msgb);
/*
* Remove from the list of active connections and set the state. User code
@@ -1187,7 +1187,7 @@ found:
}
-int sccp_system_init(void (*outgoing)(struct msgb *data, void *ctx), void *ctx)
+int sccp_system_init(void (*outgoing)(struct sccp_connection *conn, struct msgb *data, void *ctx), void *ctx)
{
sccp_system.write_data = outgoing;
sccp_system.write_context = ctx;