Bladeren bron

GENERATED: add missed options

Evgeny Grin (Karlson2k) 1 jaar geleden
bovenliggende
commit
1757738739
2 gewijzigde bestanden met toevoegingen van 12 en 2 verwijderingen
  1. 6 1
      src/mhd2/daemon_set_options.c
  2. 6 1
      src/mhd2/response_set_options.c

+ 6 - 1
src/mhd2/daemon_set_options.c

@@ -31,6 +31,8 @@ MHD_daemon_set_options (struct MHD_Daemon *daemon,
   {
     const struct MHD_DaemonOptionAndValue *const option = options + i;
     switch (option->opt) {
+    case MHD_D_O_END:
+      return MHD_SC_OK;
     case MHD_D_OPTION_WORK_MODE:
       daemon->settings.work_mode = option->val.work_mode;
       continue;
@@ -165,8 +167,11 @@ MHD_daemon_set_options (struct MHD_Daemon *daemon,
     case MHD_D_OPTION_DAUTH_DEF_MAX_NC:
       daemon->settings.dauth_def_max_nc = option->val.dauth_def_max_nc;
       continue;
+    case MHD_D_O_SENTINEL:
+    default:
+      break;
     }
-    return MHD_SC_OPTION_UNSUPPORTED;
+    return MHD_SC_OPTION_UNKNOWN;
   }
   return MHD_SC_OK;
 }

+ 6 - 1
src/mhd2/response_set_options.c

@@ -30,6 +30,8 @@ MHD_response_set_options (struct MHD_Response *response,
   {
     const struct MHD_ResponseOptionAndValue *const option = options + i;
     switch (option->opt) {
+    case MHD_R_O_END:
+      return MHD_SC_OK;
     case MHD_R_OPTION_REUSABLE:
       response->settings.reusable = option->val.reusable;
       continue;
@@ -55,8 +57,11 @@ MHD_response_set_options (struct MHD_Response *response,
       response->settings.termination_callback.v_term_cb = option->val.termination_callback.v_term_cb;
       response->settings.termination_callback.v_term_cb_cls = option->val.termination_callback.v_term_cb_cls;
       continue;
+    case MHD_R_O_SENTINEL:
+    default:
+      break;
     }
-    return MHD_SC_OPTION_UNSUPPORTED;
+    return MHD_SC_OPTION_UNKNOWN;
   }
   return MHD_SC_OK;
 }