if ((custom = ConfNodeLookupChild(conf, answer_types_key)) != NULL) {
dnslog_ctx->flags &= ~LOG_ALL_RRTYPES;
ConfNode *field;
- TAILQ_FOREACH(field, &custom->head, next)
- {
- if (field != NULL)
- {
- DnsRRTypes f;
- for (f = DNS_RRTYPE_A; f < DNS_RRTYPE_MAX; f++)
- {
- if (strcasecmp(dns_rrtype_fields[f].config_rrtype,
- field->val) == 0)
- {
- dnslog_ctx->flags |= dns_rrtype_fields[f].flags;
- break;
- }
+ TAILQ_FOREACH (field, &custom->head, next) {
+ DnsRRTypes f;
+ for (f = DNS_RRTYPE_A; f < DNS_RRTYPE_MAX; f++) {
+ if (strcasecmp(dns_rrtype_fields[f].config_rrtype, field->val) == 0) {
+ dnslog_ctx->flags |= dns_rrtype_fields[f].flags;
+ break;
}
}
}
ConfNode *custom;
if ((custom = ConfNodeLookupChild(conf, "custom")) != NULL) {
ConfNode *field;
- TAILQ_FOREACH(field, &custom->head, next) {
- if (field != NULL) {
- int f = 0;
- while(email_fields[f].config_field) {
- if ((strcmp(email_fields[f].config_field,
- field->val) == 0) ||
- (strcasecmp(email_fields[f].email_field,
- field->val) == 0))
- {
- email_ctx->fields |= (1ULL<<f);
- break;
- }
- f++;
+ TAILQ_FOREACH (field, &custom->head, next) {
+ int f = 0;
+ while (email_fields[f].config_field) {
+ if ((strcmp(email_fields[f].config_field, field->val) == 0) ||
+ (strcasecmp(email_fields[f].email_field, field->val) == 0)) {
+ email_ctx->fields |= (1ULL << f);
+ break;
}
+ f++;
}
}
}
ConfNode *md5_conf;
if ((md5_conf = ConfNodeLookupChild(conf, "md5")) != NULL) {
ConfNode *field;
- TAILQ_FOREACH(field, &md5_conf->head, next) {
- if (field != NULL) {
- if (strcmp("body", field->val) == 0) {
- SCLogInfo("Going to log the md5 sum of email body");
- email_ctx->flags |= LOG_EMAIL_BODY_MD5;
- }
- if (strcmp("subject", field->val) == 0) {
- SCLogInfo("Going to log the md5 sum of email subject");
- email_ctx->flags |= LOG_EMAIL_SUBJECT_MD5;
- }
+ TAILQ_FOREACH (field, &md5_conf->head, next) {
+ if (strcmp("body", field->val) == 0) {
+ SCLogInfo("Going to log the md5 sum of email body");
+ email_ctx->flags |= LOG_EMAIL_BODY_MD5;
+ }
+ if (strcmp("subject", field->val) == 0) {
+ SCLogInfo("Going to log the md5 sum of email subject");
+ email_ctx->flags |= LOG_EMAIL_SUBJECT_MD5;
}
}
}
ConfNode *custom;
if ((custom = ConfNodeLookupChild(conf, "custom")) != NULL) {
ConfNode *field;
- TAILQ_FOREACH(field, &custom->head, next)
- {
- if (field != NULL)
- {
- HttpField f;
- for (f = HTTP_FIELD_ACCEPT; f < HTTP_FIELD_SIZE; f++)
- {
- if ((strcmp(http_fields[f].config_field,
- field->val) == 0) ||
- (strcasecmp(http_fields[f].htp_field,
- field->val) == 0))
- {
- http_ctx->fields |= (1ULL<<f);
- break;
- }
+ TAILQ_FOREACH (field, &custom->head, next) {
+ HttpField f;
+ for (f = HTTP_FIELD_ACCEPT; f < HTTP_FIELD_SIZE; f++) {
+ if ((strcmp(http_fields[f].config_field, field->val) == 0) ||
+ (strcasecmp(http_fields[f].htp_field, field->val) == 0)) {
+ http_ctx->fields |= (1ULL << f);
+ break;
}
}
}