fixed bug 18

remotes/origin/master-1.0.x
Gurvinder Singh 17 years ago committed by Victor Julien
parent 8287ebe12c
commit 8c8b8596c8

@ -422,6 +422,8 @@ int main(int argc, char **argv)
/* Load yaml configuration file if provided. */
if (conf_filename != NULL) {
ConfYamlLoadFile(conf_filename);
} else {
SCLogError(SC_ERR_OPENING_FILE, "Configuration file has not been provided");
}
if (dump_config) {
@ -593,7 +595,11 @@ int main(int argc, char **argv)
LogFileCtx *au2a_logfile_ctx = Unified2AlertInitCtx(NULL);
if (SigLoadSignatures(de_ctx, sig_file) < 0) {
SCLogError(SC_ERR_NO_RULES_LOADED, "Loading signatures failed.\n");
if (sig_file == NULL) {
SCLogError(SC_ERR_OPENING_FILE, "Signature file has not been provided");
} else {
SCLogError(SC_ERR_NO_RULES_LOADED, "Loading signatures failed.");
}
}
struct timeval start_time;

@ -220,6 +220,12 @@ char HashListTableDefaultCompare(void *data1, uint16_t len1, void *data2, uint16
}
void *HashListTableLookup(HashListTable *ht, void *data, uint16_t datalen) {
if (ht == NULL) {
SCLogDebug("Hash List table is NULL");
return NULL;
}
uint32_t hash = ht->Hash(ht, data, datalen);
if (ht->array[hash] == NULL) {

Loading…
Cancel
Save