Parcourir la source

Fixed processing MHD_OPTION_HTTPS_CRED_TYPE in MHD_OPTION_ARRAY.
Underlying type can be not int.

Evgeny Grin (Karlson2k) il y a 8 ans
Parent
commit
4c0cf12617
1 fichiers modifiés avec 3 ajouts et 1 suppressions
  1. 3 1
      src/microhttpd/daemon.c

+ 3 - 1
src/microhttpd/daemon.c

@@ -5098,14 +5098,16 @@ parse_options_va (struct MHD_Daemon *daemon,
 		    return MHD_NO;
 		  break;
 		  /* all options taking 'enum' */
+#ifdef HTTPS_SUPPORT
 		case MHD_OPTION_HTTPS_CRED_TYPE:
 		  if (MHD_YES != parse_options (daemon,
 						servaddr,
 						opt,
-						(int) oa[i].value,
+						(gnutls_credentials_type_t) oa[i].value,
 						MHD_OPTION_END))
 		    return MHD_NO;
 		  break;
+#endif /* HTTPS_SUPPORT */
                   /* all options taking 'MHD_socket' */
                 case MHD_OPTION_LISTEN_SOCKET:
                   if (MHD_YES != parse_options (daemon,