Skip to content
Snippets Groups Projects
Commit e995ce20 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Add test command 'Z' for locking an SMB header until keypress

Just for testing/experimenting with proper recording locking support. e.g.
when one process or network node (on a LAN) has the SMB header locked, another
process/node should not be able to lock it or reading the status header.
parent 5998424a
No related branches found
No related tags found
1 merge request!455Update branch with changes from master
Pipeline #6455 passed
......@@ -102,6 +102,7 @@ char *usage=
" u = undelete all msgs (remove delete flag)\n"
" m = maintain msg base - delete old msgs and msgs over max\n"
" p[k] = pack msg base (k specifies minimum packable Kbytes)\n"
" Z = lock a msg base SMB header for testing, until keypress\n"
" L = lock a msg base for exclusive-access/backup\n"
" U = unlock a msg base\n"
"\n"
......@@ -2015,6 +2016,16 @@ int main(int argc, char **argv)
case 'M':
maint();
break;
case 'Z':
puts("Locking SMB header");
if((i=smb_locksmbhdr(&smb)) != SMB_SUCCESS) {
fprintf(errfp,"\n%s!smb_locksmbhdr returned %d: %s\n"
,beep,i,smb.last_error);
return EXIT_FAILURE;
}
fprintf(statfp,"\nHit enter to continue...");
getchar();
break;
default:
printf("%s",usage);
break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment