Commit c2a9ca8d authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Fixed rtt sink filter when copy/paste text + fix other test broken by wrong copy/paste

parent 8a5b6f4e
......@@ -293,7 +293,7 @@ static void ms_rtt_4103_sink_process(MSFilter *f) {
while((im = ms_queue_get(f->inputs[0])) != NULL) {
read_text_packet(s, im);
if (text_stream_ischar(s)) {
while (text_stream_ischar(s)) {
uint32_t character = text_stream_getchar32(s);
if (character != 0) {
......@@ -301,6 +301,8 @@ static void ms_rtt_4103_sink_process(MSFilter *f) {
data->character = character;
ms_debug("Received char 32: %lu", (long unsigned) character);
ms_filter_notify(f, MS_RTT_4103_RECEIVED_CHAR, data);
} else {
s->inbufsize = 0; // This will stop the text_stream_ischar
}
}
}
......
......@@ -203,7 +203,7 @@ static void copy_paste_text_longer_than_rtt_buffer(void) {
text_stream_putchar32(margaux->ts, (uint32_t)c);
}
BC_ASSERT_TRUE(wait_for_until(&marielle->ts->ms, &margaux->ts->ms, &marielle->stats.number_of_received_char, strlen(helloworld), 5000));
BC_ASSERT_FALSE(wait_for_until(&marielle->ts->ms, &margaux->ts->ms, &marielle->stats.number_of_received_char, strlen(helloworld), 5000));
ms_message("Received message is: %s", marielle->stats.received_chars);
strcmpresult = strcmp(marielle->stats.received_chars, helloworld);
BC_ASSERT_TRUE(strcmpresult < 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment