This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#define NO_SYSLOG
-
#include "includes.h"
extern BOOL torture_showall;
BOOL correct = True;
const char *fnames[2] = {"\\denytest1.dat", "\\denytest1.exe"};
- if (!torture_open_connection(&cli1)) {
+ if (!torture_open_connection(&cli1, 0)) {
return False;
}
} else {
char x = 1;
res = A_0;
- if (cli_read(cli1, fnum2, (void *)&x, 0, 1) == 1) {
+ if (cli_read(cli1, fnum2, (char *)&x, 0, 1) == 1) {
res += A_R;
}
- if (cli_write(cli1, fnum2, 0, (void *)&x, 0, 1) == 1) {
+ if (cli_write(cli1, fnum2, 0, (char *)&x, 0, 1) == 1) {
res += A_W;
}
}
BOOL correct = True;
const char *fnames[2] = {"\\denytest2.dat", "\\denytest2.exe"};
- if (!torture_open_connection(&cli1) || !torture_open_connection(&cli2)) {
+ if (!torture_open_connection(&cli1, 0) || !torture_open_connection(&cli2, 1)) {
return False;
}
enum deny_result res;
const char *fname = fnames[denytable2[i].isexe];
- progress_bar(i, ARRAY_SIZE(denytable1));
+ progress_bar(i, ARRAY_SIZE(denytable2));
fnum1 = cli_open(cli1, fname,
denytable2[i].mode1,
} else {
char x = 1;
res = A_0;
- if (cli_read(cli2, fnum2, (void *)&x, 0, 1) == 1) {
+ if (cli_read(cli2, fnum2, (char *)&x, 0, 1) == 1) {
res += A_R;
}
- if (cli_write(cli2, fnum2, 0, (void *)&x, 0, 1) == 1) {
+ if (cli_write(cli2, fnum2, 0, (char *)&x, 0, 1) == 1) {
res += A_W;
}
}
resultstr(denytable2[i].result));
}
- cli_close(cli1, fnum1);
- cli_close(cli2, fnum2);
+ if (fnum1 != -1) cli_close(cli1, fnum1);
+ if (fnum2 != -1) cli_close(cli2, fnum2);
}
for (i=0;i<2;i++) {