mirror of
git://git.psyc.eu/libpsyc
synced 2024-08-15 03:19:02 +00:00
testServer: no_render option
This commit is contained in:
parent
5f4e56a5e1
commit
2cf88fc131
1 changed files with 23 additions and 19 deletions
|
@ -62,6 +62,7 @@ int main (int argc, char **argv)
|
|||
w - v > 0 && memchr(w+1, (int)'v', strlen(opts) - (w - opts)) ? 3 : 2 : 1 : 0;
|
||||
uint8_t routing_only = opts && memchr(opts, (int)'r', strlen(opts));
|
||||
uint8_t parse_multiple = opts && memchr(opts, (int)'m', strlen(opts));
|
||||
uint8_t no_render = opts && memchr(opts, (int)'n', strlen(opts));
|
||||
uint8_t progress = opts && memchr(opts, (int)'p', strlen(opts));
|
||||
uint8_t stats = opts && memchr(opts, (int)'s', strlen(opts));
|
||||
size_t recv_buf_size = argc > 3 ? atoi(argv[3]) : 0;
|
||||
|
@ -114,7 +115,7 @@ int main (int argc, char **argv)
|
|||
hints.ai_socktype = SOCK_STREAM;
|
||||
hints.ai_flags = AI_PASSIVE;
|
||||
if ((rv = getaddrinfo(NULL, port, &hints, &ai)) != 0)
|
||||
{
|
||||
{
|
||||
fprintf(stderr, "error: %s\n", gai_strerror(rv));
|
||||
exit(1);
|
||||
}
|
||||
|
@ -295,6 +296,8 @@ int main (int argc, char **argv)
|
|||
if (!parse_multiple) // parse multiple packets?
|
||||
ret = -1;
|
||||
|
||||
if (!no_render)
|
||||
{
|
||||
packets[i].flag = psyc_isParseContentLengthFound(&parsers[i]) ?
|
||||
PSYC_PACKET_NEED_LENGTH : PSYC_PACKET_NO_LENGTH;
|
||||
|
||||
|
@ -319,6 +322,7 @@ int main (int argc, char **argv)
|
|||
perror("render error");
|
||||
ret = -1;
|
||||
}
|
||||
}
|
||||
|
||||
// reset packet
|
||||
packets[i].routingLength = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue