Fix HTP unittests that test pre 0.2.6 libhtp issue. HTP config wasn't restored properly.

remotes/origin/master-1.1.x
Victor Julien 15 years ago
parent 326047eec1
commit 63f6de58cb

@ -1771,6 +1771,8 @@ libhtp:\n\
ConfCreateContextBackup(); ConfCreateContextBackup();
ConfInit(); ConfInit();
HtpConfigCreateBackup();
ConfYamlLoadString(input, strlen(input)); ConfYamlLoadString(input, strlen(input));
HTPConfigure(); HTPConfigure();
@ -1817,8 +1819,10 @@ end:
if (htp_state != NULL) if (htp_state != NULL)
HTPStateFree(htp_state); HTPStateFree(htp_state);
HTPFreeConfig();
ConfDeInit(); ConfDeInit();
ConfRestoreContextBackup(); ConfRestoreContextBackup();
HtpConfigRestoreBackup();
return result; return result;
} }
@ -1842,6 +1846,8 @@ libhtp:\n\
ConfCreateContextBackup(); ConfCreateContextBackup();
ConfInit(); ConfInit();
HtpConfigCreateBackup();
ConfYamlLoadString(input, strlen(input)); ConfYamlLoadString(input, strlen(input));
HTPConfigure(); HTPConfigure();
@ -1888,8 +1894,10 @@ end:
if (htp_state != NULL) if (htp_state != NULL)
HTPStateFree(htp_state); HTPStateFree(htp_state);
HTPFreeConfig();
ConfDeInit(); ConfDeInit();
ConfRestoreContextBackup(); ConfRestoreContextBackup();
HtpConfigRestoreBackup();
return result; return result;
} }

Loading…
Cancel
Save