gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libmicrohttpd] branch master updated: Minor corrections for bc827fcc09a


From: gnunet
Subject: [libmicrohttpd] branch master updated: Minor corrections for bc827fcc09ac66b87a6ac052982beda393aeec60
Date: Mon, 29 Jan 2024 12:02:26 +0100

This is an automated email from the git hooks/post-receive script.

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

The following commit(s) were added to refs/heads/master by this push:
     new 3bd6b07f Minor corrections for bc827fcc09ac66b87a6ac052982beda393aeec60
3bd6b07f is described below

commit 3bd6b07fc4e70430e04aef67bbf83b13aa616a1e
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Mon Jan 29 12:00:37 2024 +0100

    Minor corrections for bc827fcc09ac66b87a6ac052982beda393aeec60
---
 src/examples/digest_auth_example_adv.c | 31 ++++++++++++++++++++++++++++---
 1 file changed, 28 insertions(+), 3 deletions(-)

diff --git a/src/examples/digest_auth_example_adv.c 
b/src/examples/digest_auth_example_adv.c
index 0960a81d..872e302b 100644
--- a/src/examples/digest_auth_example_adv.c
+++ b/src/examples/digest_auth_example_adv.c
@@ -70,6 +70,9 @@ static int allow_rfc2069 = 0;
  */
 static uint16_t daemon_port = 0;
 
+
+/* *** "Database" of users and "database" functions *** */
+
 /**
  * User record.
  * This kind of data (or something similar) should be stored in some database
@@ -380,6 +383,10 @@ find_entry_by_userinfo (const struct 
MHD_DigestAuthUsernameInfo *username_info)
 }
 
 
+/* *** End of "database" of users and "database" functions *** */
+
+/* *** Requests handling *** */
+
 /**
  * Send "Requested HTTP method is not supported" page
  * @param c the connection structure
@@ -427,8 +434,9 @@ get_m_algo (void)
     return MHD_DIGEST_AUTH_MULT_ALGO3_SHA256;
   else if (force_sha512_256)
     return MHD_DIGEST_AUTH_MULT_ALGO3_SHA512_256;
-  else
-    return MHD_DIGEST_AUTH_MULT_ALGO3_ANY_NON_SESSION;
+
+  /* No forced algorithm selection, let MHD to use default */
+  return MHD_DIGEST_AUTH_MULT_ALGO3_ANY_NON_SESSION;
 }
 
 
@@ -853,6 +861,9 @@ ahc_main (void *cls,
 }
 
 
+/* *** End of requests handling *** */
+
+
 /**
  * Add new users to the users "database".
  *
@@ -886,6 +897,13 @@ add_new_users (void)
 }
 
 
+/**
+ * Check and apply application parameters
+ * @param argc the argc of the @a main function
+ * @param argv the argv of the @a main function
+ * @return non-zero on success,
+ *         zero in case of any error (like wrong parameters).
+ */
 static int
 check_params (int argc, char *const *const argv)
 {
@@ -936,10 +954,13 @@ check_params (int argc, char *const *const argv)
 }
 
 
+/**
+ * The cryptographically secure random data
+ */
 static uint8_t rand_data[8];
 
 /**
- * Initialise random data
+ * Initialise the random data
  * @return non-zero if succeed,
  *         zero if failed
  */
@@ -1037,7 +1058,11 @@ main (int argc, char *const *argv)
     MHD_OPTION_CONNECTION_TIMEOUT, (unsigned int) 180,
     MHD_OPTION_END);
   if (d == NULL)
+  {
+    fprintf (stderr, "Failed to start the server on port %lu.\n",
+             (unsigned long) daemon_port);
     return 1;
+  }
   printf ("Running server on port %lu.\nPress ENTER to stop.\n",
           (unsigned long) daemon_port);
   (void) getc (stdin);

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]