diff --git a/lib/src/senkusha.c b/lib/src/senkusha.c index 84c3712..c45d01b 100644 --- a/lib/src/senkusha.c +++ b/lib/src/senkusha.c @@ -74,6 +74,8 @@ CHIAKI_EXPORT ChiakiErrorCode chiaki_senkusha_run(ChiakiSession *session) err = set_port(takion_info.sa, htons(SENKUSHA_PORT)); assert(err == CHIAKI_ERR_SUCCESS); + takion_info.enable_crypt = false; + takion_info.cb = senkusha_takion_cb; takion_info.cb_user = &senkusha; diff --git a/lib/src/streamconnection.c b/lib/src/streamconnection.c index 8b20369..58394cf 100644 --- a/lib/src/streamconnection.c +++ b/lib/src/streamconnection.c @@ -126,6 +126,8 @@ CHIAKI_EXPORT ChiakiErrorCode chiaki_stream_connection_run(ChiakiStreamConnectio err = set_port(takion_info.sa, htons(STREAM_CONNECTION_PORT)); assert(err == CHIAKI_ERR_SUCCESS); + takion_info.enable_crypt = true; + takion_info.cb = stream_connection_takion_cb; takion_info.cb_user = stream_connection; diff --git a/lib/src/takion.c b/lib/src/takion.c index 551877b..9f5d015 100644 --- a/lib/src/takion.c +++ b/lib/src/takion.c @@ -501,6 +501,8 @@ static ChiakiErrorCode takion_handshake(ChiakiTakion *takion) static void takion_data_drop(uint64_t seq_num, void *elem_user, void *cb_user) { + ChiakiTakion *takion = cb_user; + CHIAKI_LOGE(takion->log, "Takion dropping data with seq num %llx\n", (unsigned long long)seq_num); TakionDataPacketEntry *entry = elem_user; free(entry->packet_buf); free(entry); @@ -516,7 +518,7 @@ static void *takion_thread_func(void *user) if(chiaki_reorder_queue_init_32(&takion->data_queue, TAKION_REORDER_QUEUE_SIZE_EXP, takion->tag_remote) != CHIAKI_ERR_SUCCESS) goto beach; - chiaki_reorder_queue_set_drop_cb(&takion->data_queue, takion_data_drop, NULL); + chiaki_reorder_queue_set_drop_cb(&takion->data_queue, takion_data_drop, takion); // TODO ChiakiCongestionControl congestion_control; // if(chiaki_congestion_control_start(&congestion_control, takion) != CHIAKI_ERR_SUCCESS) @@ -794,6 +796,8 @@ static void takion_handle_packet_message_data(ChiakiTakion *takion, uint8_t *pac return; entry->type_b = type_b; + entry->packet_buf = packet_buf; + entry->packet_size = packet_buf_size; entry->payload = payload; entry->payload_size = payload_size; entry->channel = ntohs(*((uint16_t *)(payload + 4)));