diff options
author | Youness Alaoui <youness.alaoui@collabora.co.uk> | 2010-01-12 22:00:48 -0500 |
---|---|---|
committer | Youness Alaoui <youness.alaoui@collabora.co.uk> | 2010-02-16 17:38:13 -0500 |
commit | 82680fa14991642bbe66c4f0b59382fd5aa07155 (patch) | |
tree | dbe86bf6dafa4428ae76368cb976fef6bedd52b8 /tests/test-pseudotcp.c | |
parent | 3348c78f2aff249ac6a44a45566f1d232c87a395 (diff) | |
download | libnice-82680fa14991642bbe66c4f0b59382fd5aa07155.tar.gz |
Fix test-pseudotcp to not fail randomly, use strncmp instead of strcmp
Diffstat (limited to 'tests/test-pseudotcp.c')
-rw-r--r-- | tests/test-pseudotcp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/test-pseudotcp.c b/tests/test-pseudotcp.c index b860bab..a819cf1 100644 --- a/tests/test-pseudotcp.c +++ b/tests/test-pseudotcp.c @@ -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); } } |