htp/bool: Use bool instead of int

pull/9829/head
Jeff Lucovsky 2 years ago committed by Victor Julien
parent 84b2d665d6
commit 28c950cef5

@ -61,7 +61,7 @@
* \param uri_include_all boolean to indicate if scheme, username/password,
hostname and port should be part of the buffer
*/
bstr *SCHTPGenerateNormalizedUri(htp_tx_t *tx, htp_uri_t *uri, int uri_include_all)
bstr *SCHTPGenerateNormalizedUri(htp_tx_t *tx, htp_uri_t *uri, bool uri_include_all)
{
if (uri == NULL)
return NULL;

@ -48,6 +48,6 @@
#include "suricata-common.h"
bstr *SCHTPGenerateNormalizedUri(htp_tx_t *tx, htp_uri_t *uri, int uri_include_all);
bstr *SCHTPGenerateNormalizedUri(htp_tx_t *tx, htp_uri_t *uri, bool uri_include_all);
#endif /* __APP_LAYER_HTP_LIBHTP__H__ */

@ -2463,7 +2463,7 @@ static int HTPCallbackResponseHeaderData(htp_tx_data_t *tx_data)
*/
static void HTPConfigSetDefaultsPhase1(HTPCfgRec *cfg_prec)
{
cfg_prec->uri_include_all = FALSE;
cfg_prec->uri_include_all = false;
cfg_prec->request.body_limit = HTP_CONFIG_DEFAULT_REQUEST_BODY_LIMIT;
cfg_prec->response.body_limit = HTP_CONFIG_DEFAULT_RESPONSE_BODY_LIMIT;
cfg_prec->request.inspect_min_size = HTP_CONFIG_DEFAULT_REQUEST_INSPECT_MIN_SIZE;
@ -2785,7 +2785,7 @@ static void HTPConfigParseParameters(HTPCfgRec *cfg_prec, ConfNode *s,
HTP_DECODER_URL_PATH,
ConfValIsTrue(p->val));
} else if (strcasecmp("uri-include-all", p->name) == 0) {
cfg_prec->uri_include_all = ConfValIsTrue(p->val);
cfg_prec->uri_include_all = (1 == ConfValIsTrue(p->val));
SCLogDebug("uri-include-all %s",
cfg_prec->uri_include_all ? "enabled" : "disabled");
} else if (strcasecmp("query-plusspace-decode", p->name) == 0) {

@ -157,8 +157,6 @@ typedef struct HTPCfgRec_ {
htp_cfg_t *cfg;
struct HTPCfgRec_ *next;
int uri_include_all; /**< use all info in uri (bool) */
/** max size of the client body we inspect */
int randomize;
int randomize_range;
@ -171,6 +169,8 @@ typedef struct HTPCfgRec_ {
HTPCfgDir request;
HTPCfgDir response;
bool uri_include_all; /**< use all info in uri (bool) */
} HTPCfgRec;
/** Struct used to hold chunks of a body on a request */

Loading…
Cancel
Save