[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r7578 - in libmicrohttpd/doc: . examples
From: |
gnunet |
Subject: |
[GNUnet-SVN] r7578 - in libmicrohttpd/doc: . examples |
Date: |
Tue, 19 Aug 2008 07:03:27 -0600 (MDT) |
Author: sebdocwriter
Date: 2008-08-19 07:03:27 -0600 (Tue, 19 Aug 2008)
New Revision: 7578
Modified:
libmicrohttpd/doc/examples/simplepost.c
libmicrohttpd/doc/processingpost.inc
Log:
corrected error handling in post processing example
Modified: libmicrohttpd/doc/examples/simplepost.c
===================================================================
--- libmicrohttpd/doc/examples/simplepost.c 2008-08-16 15:15:53 UTC (rev
7577)
+++ libmicrohttpd/doc/examples/simplepost.c 2008-08-19 13:03:27 UTC (rev
7578)
@@ -86,7 +86,8 @@
if (con_info->answerstring) free (con_info->answerstring);
}
- free (con_info);
+ free (con_info);
+ *con_cls = NULL;
}
@@ -100,6 +101,7 @@
con_info = malloc (sizeof (struct connection_info_struct));
if (NULL == con_info) return MHD_NO;
+ con_info->answerstring = NULL;
if (0 == strcmp (method, "POST"))
{
@@ -137,7 +139,8 @@
return MHD_YES;
}
- else return send_page (connection, con_info->answerstring);
+ else
+ if (NULL != con_info->answerstring) return send_page (connection,
con_info->answerstring);
}
return send_page(connection, errorpage);
Modified: libmicrohttpd/doc/processingpost.inc
===================================================================
--- libmicrohttpd/doc/processingpost.inc 2008-08-16 15:15:53 UTC (rev
7577)
+++ libmicrohttpd/doc/processingpost.inc 2008-08-19 13:03:27 UTC (rev
7578)
@@ -122,7 +122,8 @@
if (con_info->answerstring) free (con_info->answerstring);
}
- free (con_info);
+ free (con_info);
+ *con_cls = NULL;
}
@end verbatim
@noindent
@@ -157,6 +158,7 @@
con_info = malloc (sizeof (struct connection_info_struct));
if (NULL == con_info) return MHD_NO;
+ con_info->answerstring = NULL;
@end verbatim
@noindent
@@ -214,7 +216,7 @@
return MHD_YES;
}
- else return send_page (connection, con_info->answerstring);
+ else if (NULL != con_info->answerstring) return send_page (connection,
con_info->answerstring);
}
@end verbatim
@noindent
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r7578 - in libmicrohttpd/doc: . examples,
gnunet <=