CloseHandle (child_stderr_write);
- while (1) {
+ while (true) {
char buffer[512];
DWORD read;
if (!ReadFile(child_stderr_read, buffer, sizeof(buffer), &read, 0) || read == 0) {
return m;
}
- while (1) {
+ while (true) {
struct mntent* mnt = getmntent (f);
if (!mnt) {
break;
* where we should look for subtitles (video and audio are always present,
* so they are ok).
*/
- while (1) {
+ while (true) {
int r = av_read_frame (_format_context, &_packet);
if (r < 0) {
break;
FileGroup::read (uint8_t* buffer, int amount) const
{
int read = 0;
- while (1) {
+ while (true) {
int const this_time = fread (buffer + read, 1, amount - read, _current_file);
read += this_time;
if (read == amount) {
throw DecodeError (N_("could not push buffer into filter chain."));
}
- while (1) {
+ while (true) {
if (av_buffersink_get_frame (_buffer_sink_context, _frame) < 0) {
break;
}
ScopedTemporary temp_cert;
f = temp_cert.open ("wb");
char buffer[4096];
- while (1) {
+ while (true) {
int const N = zip_fread (zip_file, buffer, sizeof (buffer));
fwrite (buffer, 1, N, f);
if (N < int (sizeof (buffer))) {
void
JobManager::scheduler ()
{
- while (1) {
+ while (true) {
bool active_jobs = false;
{
boost::asio::io_service io_service;
tcp::acceptor a (io_service, tcp::endpoint (tcp::v4 (), port));
- while (1) {
+ while (true) {
try {
shared_ptr<tcp::socket> s (new tcp::socket (io_service));
a.accept (*s);
string url;
State state = AWAITING_G;
- while (1) {
+ while (true) {
char data[MAX_LENGTH];
boost::system::error_code error;
size_t len = socket->read_some (boost::asio::buffer (data), error);
int64_t const pass_size = 256;
shared_ptr<AudioBuffers> pass (new AudioBuffers (_channels, 256));
- while (1) {
+ while (true) {
int const frames = swr_convert (_swr_context, (uint8_t **) pass->data(), pass_size, 0, 0);
if (frames < 0) {
void
Server::worker_thread ()
{
- while (1) {
+ while (true) {
boost::mutex::scoped_lock lock (_worker_mutex);
while (_queue.empty () && !_terminate) {
_empty_condition.wait (lock);
ServerFinder::listen_thread ()
try
{
- while (1) {
+ while (true) {
shared_ptr<Socket> sock (new Socket (60));
try {
void
UpdateChecker::thread ()
{
- while (1) {
+ while (true) {
/* Block until there is something to do */
boost::mutex::scoped_lock lock (_process_mutex);
while (_to_do == 0) {
Writer::thread ()
try
{
- while (1)
+ while (true)
{
boost::mutex::scoped_lock lock (_mutex);
- while (1) {
+ while (true) {
if (_finish || _queued_full_in_memory > _maximum_frames_in_memory || have_sequenced_image_at_queue_head ()) {
/* We've got something to do: go and do it */
++N;
}
- while (1) {
+ while (true) {
shared_ptr<Job> job = _job.lock ();
assert (job);
);
int r;
- while (1) {
+ while (true) {
r = c->ShowModal ();
if (r == wxID_OK && c->GetPath() == wxStandardPaths::Get().GetDocumentsDir()) {
error_dialog (this, _("You did not select a folder. Make sure that you select a folder before clicking Open."));
}
int r;
- while (1) {
+ while (true) {
r = c->ShowModal ();
if (r == wxID_OK && c->GetPath() == wxStandardPaths::Get().GetDocumentsDir()) {
error_dialog (this, _("You did not select a folder. Make sure that you select a folder before clicking Open."));
bool keep_going = false;
int option_index = 0;
- while (1) {
+ while (true) {
static struct option long_options[] = {
{ "version", no_argument, 0, 'v'},
{ "help", no_argument, 0, 'h'},
}
if (keep_going) {
- while (1) {
+ while (true) {
dcpomatic_sleep (3600);
}
}
boost::filesystem::path output;
int option_index = 0;
- while (1) {
+ while (true) {
static struct option long_options[] = {
{ "version", no_argument, 0, 'v'},
{ "help", no_argument, 0, 'h'},
program_name = argv[0];
int option_index = 0;
- while (1) {
+ while (true) {
static struct option long_options[] = {
{ "help", no_argument, 0, 'h'},
{ "output", required_argument, 0, 'o'},
bool write_log = false;
int option_index = 0;
- while (1) {
+ while (true) {
static struct option long_options[] = {
{ "version", no_argument, 0, 'v'},
{ "help", no_argument, 0, 'h'},
string film_dir;
string server_host;
- while (1) {
+ while (true) {
static struct option long_options[] = {
{ "help", no_argument, 0, 'h'},
{ "server", required_argument, 0, 's'},
#include "wx_util.h"
using std::string;
+using std::cout;
using boost::function;
using boost::optional;
_message->SetLabel (_("Downloading certificate"));
run_gui_loop ();
+ /* Try dcp2000, imb and ims prefixes (see mantis #375) */
+
optional<string> error = get_from_zip_url (
String::compose (
"ftp://service:t3chn1c1an@ftp.doremilabs.com/Certificates/%1xxx/dcp2000-%2.dcicerts.zip",
_load
);
+ if (error) {
+ error = get_from_zip_url (
+ String::compose (
+ "ftp://service:t3chn1c1an@ftp.doremilabs.com/Certificates/%1xxx/imb-%2.dcicerts.zip",
+ serial.substr(0, 3), serial
+ ),
+ String::compose ("imb-%1.cert.sha256.pem", serial),
+ _load
+ );
+ }
+
+ if (error) {
+ error = get_from_zip_url (
+ String::compose (
+ "ftp://service:t3chn1c1an@ftp.doremilabs.com/Certificates/%1xxx/ims-%2.dcicerts.zip",
+ serial.substr(0, 3), serial
+ ),
+ String::compose ("ims-%1.cert.sha256.pem", serial),
+ _load
+ );
+ }
+
if (error) {
error_dialog (this, std_to_wx (error.get ()));
} else {
{
ContentList sel;
long int s = -1;
- while (1) {
+ while (true) {
s = _content->GetNextItem (s, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
if (s == -1) {
break;
void run ()
{
- while (1) {
+ while (true) {
if (finished ()) {
return;
}