return 0;
}
+static int _conn_free(sigtran_conn_t *conn)
+{
+ talloc_free(conn->mtp3_link);
+ talloc_free(conn->mtp3_link_set);
+
+ return 0;
+}
+
/** Add a route to an m3ua_association
*
*/
conn = talloc_zero(ctx, sigtran_conn_t);
conn->conf = conf;
- conn->bsc_data = bsc_data_alloc(ctx);
+ conn->bsc_data = bsc_data_alloc(conn;
+ talloc_set_destructor(conn, _conn_free);
/*
* Create a new link. This will run over SCTP/M3UA
struct mtp_m3ua_client_link *link = mtp_link->data;
if (link->asptm_active) {
- /* need to allow the event loop to actually send the message */
+ /* clear pending events */
+ osmo_timer_del(&link->connect_timer);
+ osmo_timer_del(&link->t_beat);
+ osmo_timer_del(&link->t_ack);
+
m3ua_send_aspdn(link);
+
+ /* need to allow the event loop to actually send the message */
schedule_aspdn_t_ack(link);
} else
clear_link(link);