Revision 382180cc src/controlledconnection.cpp

View differences:

src/controlledconnection.cpp
190 190
	  int priority = toInt(words[6]);
191 191
	  int duration = toInt(words[7]);	// duration in seconds
192 192
	  const std::string path = unescapeWS(words[8]);
193
	  const std::string extra = words[9].substr(1, words[9].size()-2);
193
	  std::string extra;
194 194
	  pid_t pid = 0;
195 195
	  uid_t uid = 0;
196 196
	  gid_t gid = 0;
197 197

  
198
	  // Get the ancillary data (credentials)
198
	  if (words[9].size() >= 2)
199
	    extra = unescapeWS(words[9].substr(1, words[9].size()-2));
200
	  else
201
	    extra = "";
202

  
199 203
	  if (path.empty() || path[0] != '/')
200 204
	    writeControl("ERROR SCHEDULE MUST BE ABSOLUTE PATH\n");
201 205
	  else if (!readCredentials(controlFD, pid, uid, gid)) 
......
204 208
	    writeControl("ERROR SCHEDULE FAILED TO READ CREDENTIALS\n");
205 209
	  else if (!accessOk(path, uid)) 
206 210
	    writeControl("ERROR SCHEDULE PATH ACCESS ERROR\n");
207
	  else if (theTime < getCurrentTime()) 
211
	  else if (theTime + duration < getCurrentTime()) 
208 212
	    writeControl("ERROR SCHEDULE START TIME IN THE PAST\n");
209 213
	  else {
210 214
	    std::cerr << "Scheduling recording for " << theTime 

Also available in: Unified diff