Commit a570db70 authored by Jesse Heckman's avatar Jesse Heckman

security extras

parent 9ece08f3
......@@ -145,7 +145,6 @@ function writeexp(expfile,datdir,X,Y,snd,int,ledon,sndon,dur,block)
expfile = fcheckext(expfile,'.exp'); % check whether the extension exp is included
fid = fopen(expfile,'wt+'); % this is the way to write date to a new file
ntrials = numel(X);
blocksz = length(block);
......@@ -168,7 +167,7 @@ function writeexp(expfile,datdir,X,Y,snd,int,ledon,sndon,dur,block)
for ii = 1:ntrials % each location
writetrl(fid,ii);
writeled(fid,'LED',0,0,5,0,0,0,ledon(ii)); % fixation LED
pb_writesnd(fid,'SND',round(X(ii)),Y(ii),snd(ii),0,0,ledon(ii)+sndon(ii),ledon(ii)+sndon(ii)+dur); % Sound on
writesnd(fid,'SND',round(X(ii)),Y(ii),snd(ii),0,0,ledon(ii)+sndon(ii),ledon(ii)+sndon(ii)+dur); % Sound on
end
end
fclose(fid);
......
......@@ -18,6 +18,7 @@ function pb_genpassword(varargin)
spc = '±§!@€#$%^&*+=:;|\~<,>.?';
password = '';
rng('shuffle');
for iChunk = 1:nchunk
s = blanks(nchar);
order = randperm(nchar);
......
function [sn] = pb_mountserver(varargin)
function sn = pb_mountserver(varargin)
% PB_MOUNTSERVER(varargin)
%
% PB_MOUNTSERVER(varargin) mounts server for pulling or storing data. TO
......@@ -19,7 +19,7 @@ function [sn] = pb_mountserver(varargin)
if s > 0 && s ~= 64; disp(cout); end
if s == 64 && ~force; system('umount ~/sharename/'); prfx = 'un'; end
if s == 0 && flag; pb_open; end
if s == 0 && flag || flag && force; pb_open; end
disp([srv ' is ' prfx 'mounted.' newline]);
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment