Commit 82680fa1 authored by Youness Alaoui's avatar Youness Alaoui

Fix test-pseudotcp to not fail randomly, use strncmp instead of strcmp

parent 3348c78f
......@@ -121,10 +121,11 @@ static void readable (PseudoTcpSocket *sock, gpointer data)
}
}
} else {
if (len == 26 && strcmp (buf, "abcdefghijklmnopqrstuvwxyz") == 0) {
if (len == 26 && strncmp (buf, "abcdefghijklmnopqrstuvwxyz", len) == 0) {
pseudo_tcp_socket_close (left, FALSE);
pseudo_tcp_socket_close (right, FALSE);
} else {
g_debug ("Error reading data.. read %d bytes : %s", len, buf);
exit (-1);
}
}
......
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