Revision a7dee730

View differences:

clientconnection.cpp
127 127
  control_.readLine(reply);
128 128
  
129 129
  if (reply.substr(0, 3) == "JOB") {
130
    int job = toInt(reply.substr(5));
130
    int job = toInt(reply.substr(4));
131 131
    control_.readLine(reply);	// Ok
132 132
    return job;
133 133
  }
controlledconnection.cpp
207 207

  
208 208
	    Recording r(type, channel, priority, theTime, duration, path, uid);
209 209
	    scheduler->add(r);
210
	    std::cerr << "Job number is " << r.getJob() << "\n";
210 211
	    writeControl("JOB " + ::toString(r.getJob()) + "\n");
211 212
	    writeControl("OK\n");
212 213
	  }
dvbsched.cpp
111 111
      return 1;
112 112
    }
113 113

  
114
    std::cout << "Job number is " << job << std::endl;
115

  
114 116
    StringList messages;
115 117
    client.checkSchedule(messages);
116 118

  
scheduler.cpp
66 66
  //     (this is true if it was written by writeDB)
67 67
  std::ifstream i(dbfile.c_str());
68 68
  if (!i) {
69
    std::cerr << "Warning: failed to open database file " << dbfile << "for reading:\n"
69
    std::cerr << "Warning: failed to open database file " << dbfile << " for reading:\n"
70 70
	      << strerror(errno) << "\n";
71 71
    writeDB();
72 72
  }
......
81 81
  // Write the db file
82 82
  std::ofstream o(dbfile.c_str());
83 83
  if (!o) {
84
    std::cerr << "Warning: failed to open database file " << dbfile << "for writing:\n"
84
    std::cerr << "Warning: failed to open database file " << dbfile << " for writing:\n"
85 85
	      << strerror(errno) << "\n";
86 86
    return;
87 87
  }
......
135 135
    startRecording(r);
136 136

  
137 137
    recordings.pop_front();
138
    writeDB();
138 139
  }
139 140
}
140 141

  

Also available in: Unified diff