[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [libmicrohttpd] branch master updated: Still there is an is
From: |
gnunet |
Subject: |
[GNUnet-SVN] [libmicrohttpd] branch master updated: Still there is an issue with re-open a file. Patch applied below to avoid it. |
Date: |
Tue, 14 Mar 2017 02:41:52 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository libmicrohttpd.
The following commit(s) were added to refs/heads/master by this push:
new 59268ccf Still there is an issue with re-open a file. Patch applied
below to avoid it.
59268ccf is described below
commit 59268ccff1583c06d215baef5423aac5c78c0c02
Author: Christian Grothoff <address@hidden>
AuthorDate: Tue Mar 14 02:40:10 2017 +0100
Still there is an issue with re-open a file. Patch applied below to
avoid it.
Also iterate_post() always returns MHD_OK, because the app's logic
driven
from the value of con_info->answercode().
And in case if fwrite() fails we also update the answer code & page and
MHD_post_process() overwrite them (fileioerror becomes postprocerror).
---
doc/examples/largepost.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/doc/examples/largepost.c b/doc/examples/largepost.c
index 6846a536..1edf4d50 100644
--- a/doc/examples/largepost.c
+++ b/doc/examples/largepost.c
@@ -138,6 +138,8 @@ iterate_post (void *coninfo_cls,
if (! con_info->fp)
{
+ if (0 != con_info->answercode) /* something went wrong */
+ return MHD_YES;
if (NULL != (fp = fopen (filename, "rb")))
{
fclose (fp);
@@ -161,7 +163,7 @@ iterate_post (void *coninfo_cls,
{
con_info->answerstring = fileioerror;
con_info->answercode = MHD_HTTP_INTERNAL_SERVER_ERROR;
- return MHD_NO;
+ return MHD_YES;
}
}
@@ -325,7 +327,11 @@ main ()
MHD_OPTION_NOTIFY_COMPLETED, &request_completed,
NULL,
MHD_OPTION_END);
if (NULL == daemon)
- return 1;
+ {
+ fprintf (stderr,
+ "Failed to start daemon\n");
+ return 1;
+ }
(void) getchar ();
MHD_stop_daemon (daemon);
return 0;
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [libmicrohttpd] branch master updated: Still there is an issue with re-open a file. Patch applied below to avoid it.,
gnunet <=