소스 검색

fix return value of MHD_queue_basic_auth_fail_response

Christian Grothoff 5 년 전
부모
커밋
860b42e918
3개의 변경된 파일6개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 0
      ChangeLog
  2. 1 1
      src/include/microhttpd.h
  3. 2 2
      src/microhttpd/basicauth.c

+ 3 - 0
ChangeLog

@@ -1,3 +1,6 @@
+Thu 02 Jul 2020 09:56:23 PM CEST
+    Fixed return type of MHD_queue_basic_auth_fail_response. -CA/CG
+
 Sun 28 Jun 2020 09:36:01 PM CEST
 Sun 28 Jun 2020 09:36:01 PM CEST
     Fix buffer overflow issue in URL parser.
     Fix buffer overflow issue in URL parser.
     Releasing libmicrohttpd 0.9.71. -CG
     Releasing libmicrohttpd 0.9.71. -CG

+ 1 - 1
src/include/microhttpd.h

@@ -3733,7 +3733,7 @@ MHD_basic_auth_get_username_password (struct MHD_Connection *connection,
  * @return #MHD_YES on success, #MHD_NO otherwise
  * @return #MHD_YES on success, #MHD_NO otherwise
  * @ingroup authentication
  * @ingroup authentication
  */
  */
-_MHD_EXTERN int
+_MHD_EXTERN enum MHD_Result
 MHD_queue_basic_auth_fail_response (struct MHD_Connection *connection,
 MHD_queue_basic_auth_fail_response (struct MHD_Connection *connection,
                                     const char *realm,
                                     const char *realm,
                                     struct MHD_Response *response);
                                     struct MHD_Response *response);

+ 2 - 2
src/microhttpd/basicauth.c

@@ -120,12 +120,12 @@ MHD_basic_auth_get_username_password (struct MHD_Connection *connection,
  * @return #MHD_YES on success, #MHD_NO otherwise
  * @return #MHD_YES on success, #MHD_NO otherwise
  * @ingroup authentication
  * @ingroup authentication
  */
  */
-int
+enum MHD_Result
 MHD_queue_basic_auth_fail_response (struct MHD_Connection *connection,
 MHD_queue_basic_auth_fail_response (struct MHD_Connection *connection,
                                     const char *realm,
                                     const char *realm,
                                     struct MHD_Response *response)
                                     struct MHD_Response *response)
 {
 {
-  int ret;
+  enum MHD_Result ret;
   int res;
   int res;
   size_t hlen = strlen (realm) + strlen ("Basic realm=\"\"") + 1;
   size_t hlen = strlen (realm) + strlen ("Basic realm=\"\"") + 1;
   char *header;
   char *header;