|
|
@@ -36,14 +36,16 @@
|
|
|
} while (0)
|
|
|
|
|
|
enum np_match_result
|
|
|
-np_expect_match(char* status, char** server_expect, int expect_count, int flags)
|
|
|
+np_expect_match(char *status, char **server_expect, int expect_count, int flags)
|
|
|
{
|
|
|
int i, match = 0, partial = 0;
|
|
|
+
|
|
|
for (i = 0; i < expect_count; i++) {
|
|
|
if (flags & NP_MATCH_VERBOSE)
|
|
|
- printf ("looking for [%s] %s [%s]\n", server_expect[i],
|
|
|
- (flags & NP_MATCH_EXACT) ? "in beginning of" : "anywhere in",
|
|
|
- status);
|
|
|
+ printf("looking for [%s] %s [%s]\n", server_expect[i],
|
|
|
+ (flags & NP_MATCH_EXACT) ?
|
|
|
+ "in beginning of" : "anywhere in",
|
|
|
+ status);
|
|
|
|
|
|
if (flags & NP_MATCH_EXACT) {
|
|
|
if (strncmp(status, server_expect[i], strlen(server_expect[i])) == 0) {
|
|
|
@@ -62,6 +64,7 @@ np_expect_match(char* status, char** server_expect, int expect_count, int flags)
|
|
|
}
|
|
|
VERBOSE("couldn't find it");
|
|
|
}
|
|
|
+
|
|
|
if ((flags & NP_MATCH_ALL && match == expect_count) ||
|
|
|
(!(flags & NP_MATCH_ALL) && match >= 1))
|
|
|
return NP_MATCH_SUCCESS;
|