1
0
Fork 0
mirror of git://git.psyc.eu/libpsyc synced 2024-08-15 03:19:02 +00:00

testServer: fixed list parsing

This commit is contained in:
tg(x) 2011-04-29 17:01:54 +02:00
parent 77cef1151b
commit 6f9a753415
3 changed files with 7 additions and 10 deletions

View file

@ -10,4 +10,3 @@ _message_foo_bar
ohai there!
\o/
|
|

View file

@ -17,9 +17,3 @@ _message_foo_bar
ohai there!
\o/
|
:_target psyc://foo.bar/~baz
:_test 123
_message_test
ohai!
|

View file

@ -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;