diff --git a/test/packets/error-1-length b/test/packets/error-1-length index 21c91fe..45f49d6 100644 --- a/test/packets/error-1-length +++ b/test/packets/error-1-length @@ -10,4 +10,3 @@ _message_foo_bar ohai there! \o/ | -| diff --git a/test/packets/error-2-list b/test/packets/error-2-list index b6ce6d5..f6fe4fe 100644 --- a/test/packets/error-2-list +++ b/test/packets/error-2-list @@ -17,9 +17,3 @@ _message_foo_bar ohai there! \o/ | -:_target psyc://foo.bar/~baz - -:_test 123 -_message_test -ohai! -| diff --git a/test/testServer.c b/test/testServer.c index 0092eaf..64a6f00 100644 --- a/test/testServer.c +++ b/test/testServer.c @@ -285,14 +285,18 @@ int main(int argc, char **argv) if (verbose) printf("\t\t\t\t\t\t\t\t# n:%ld v:%ld c:%ld r:%ld\n", pname->length, pvalue->length, parsers[i].contentParsed, parsers[i].routingLength); + } - if (name.length >= 5 && memcmp(name.ptr, "_list", 5) == 0) { + switch (ret) { + case PSYC_PARSE_ROUTING: + case PSYC_PARSE_ENTITY: + if (pname->length >= 5 && memcmp(pname->ptr, "_list", 5) == 0) { if (verbose) printf("## LIST START\n"); psyc_initParseListState(&listState); - psyc_nextParseListBuffer(&listState, value); + psyc_nextParseListBuffer(&listState, *pvalue); do { - retl = psyc_parseList(&listState, &name, &value, &elem); + retl = psyc_parseList(&listState, pname, pvalue, &elem); switch (retl) { case PSYC_PARSE_LIST_END: retl = 0;