-more minor fixes

This commit is contained in:
Christian Grothoff
2022-06-07 18:01:13 +02:00
parent b627fdaf25
commit 4195c246bb
2 changed files with 20 additions and 4 deletions
+10 -1
View File
@@ -89,7 +89,16 @@ test_simple_large ()
while (i < size)
{
delta = 1 + MHD_random_ () % (size - i);
MHD_post_process (pp, &data[i], delta);
if (MHD_YES !=
MHD_post_process (pp,
&data[i],
delta))
{
fprintf (stderr,
"MHD_post_process() failed!\n");
MHD_destroy_post_processor (pp);
return 1;
}
i += delta;
}
MHD_destroy_post_processor (pp);
+10 -3
View File
@@ -145,12 +145,19 @@ ahc_echo (void *cls,
if (pp == NULL)
{
eok = 0;
pp = MHD_create_post_processor (connection, 1024, &post_iterator, &eok);
if (pp == NULL)
pp = MHD_create_post_processor (connection,
1024,
&post_iterator,
&eok);
if (NULL == pp)
abort ();
*req_cls = pp;
}
MHD_post_process (pp, upload_data, *upload_data_size);
if (MHD_YES !=
MHD_post_process (pp,
upload_data,
*upload_data_size))
abort ();
if ((eok == 3) && (0 == *upload_data_size))
{
response = MHD_create_response_from_buffer (strlen (url),