]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
easyoptions: add the two new PRE* options
authorDaniel Stenberg <daniel@haxx.se>
Wed, 29 Sep 2021 08:06:42 +0000 (10:06 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 29 Sep 2021 12:48:02 +0000 (14:48 +0200)
Follow-up to a517378de58358a

Also fix optiontable.pl to do the correct remainder on the entry.

Reported-by: Gisle Vanem
Bug: https://github.com/curl/curl/commit/a517378de58358a85b7cfe9efecb56051268f629#commitcomment-57224830
Closes #7791

lib/easyoptions.c
lib/optiontable.pl

index 717b081a370ada936a0a292f6c3255eb366bdbcf..bc149e7be4bf64249ce53391069e31f1af97d771 100644 (file)
@@ -192,6 +192,8 @@ struct curl_easyoption Curl_easyopts[] = {
   {"POSTQUOTE", CURLOPT_POSTQUOTE, CURLOT_SLIST, 0},
   {"POSTREDIR", CURLOPT_POSTREDIR, CURLOT_VALUES, 0},
   {"PREQUOTE", CURLOPT_PREQUOTE, CURLOT_SLIST, 0},
+  {"PREREQDATA", CURLOPT_PREREQDATA, CURLOT_CBPTR, 0},
+  {"PREREQFUNCTION", CURLOPT_PREREQFUNCTION, CURLOT_FUNCTION, 0},
   {"PRE_PROXY", CURLOPT_PRE_PROXY, CURLOT_STRING, 0},
   {"PRIVATE", CURLOPT_PRIVATE, CURLOT_OBJECT, 0},
   {"PROGRESSDATA", CURLOPT_XFERINFODATA, CURLOT_CBPTR, CURLOT_FLAG_ALIAS},
index 2a15f04389e76d27aeeac40dd85f14353e8d3b7c..abd80a89568754630828866d2911fe32131488c2 100644 (file)
@@ -111,7 +111,7 @@ print <<FOOT
  */
 int Curl_easyopts_check(void)
 {
-  return (CURLOPT_LASTENTRY != ($lastnum + 1));
+  return ((CURLOPT_LASTENTRY%10000) != ($lastnum + 1));
 }
 #endif
 FOOT