From: <svn...@op...> - 2009-03-16 15:35:54
|
Author: bellmich Date: Mon Mar 16 16:35:43 2009 New Revision: 976 URL: http://libsyncml.opensync.org/changeset/976 Log: Even a too short request is an error. Modified: trunk/tests/check_libsoup.c Modified: trunk/tests/check_libsoup.c ============================================================================== --- trunk/tests/check_libsoup.c Mon Mar 16 16:32:06 2009 (r975) +++ trunk/tests/check_libsoup.c Mon Mar 16 16:35:43 2009 (r976) @@ -66,9 +66,9 @@ const char *content = msg->request_body->data; size_t length = msg->request_body->length; #endif - if (length > strlen("test")) - length = strlen("test"); - if (memcmp("test", content, length) == 0) { + if (length < strlen("test")) { + g_atomic_int_inc(&server_errors); + } else if (memcmp("test", content, 4) == 0) { g_atomic_int_inc(&server_messages); } else { g_atomic_int_inc(&server_errors); |