Currently we have ~15 error codes which indicate an EOF condition. One
should suffice, so drop all codes except the generic E_EOF and use
that everywhere.
25 files changed:
PARA_DEBUG_LOG("adding %u bytes\n", len);
btr_add_output_dont_free(start, len, btrn);
}
PARA_DEBUG_LOG("adding %u bytes\n", len);
btr_add_output_dont_free(start, len, btrn);
}
goto out;
}
if (pard->current_chunk == pard->first_chunk)
goto out;
}
if (pard->current_chunk == pard->first_chunk)
PARA_DEBUG_LOG("adding chunk %u\n", pard->current_chunk);
btr_add_output_dont_free(start, len, btrn);
if (pard->current_chunk >= pard->last_chunk) {
PARA_DEBUG_LOG("adding chunk %u\n", pard->current_chunk);
btr_add_output_dont_free(start, len, btrn);
if (pard->current_chunk >= pard->last_chunk) {
goto out;
}
pard->current_chunk++;
goto out;
}
pard->current_chunk++;
bytes = btr_next_buffer(btrn, &data);
if (ret < 0 || bytes < wn->min_iqs) { /* eof */
assert(btr_no_parent(btrn));
bytes = btr_next_buffer(btrn, &data);
if (ret < 0 || bytes < wn->min_iqs) { /* eof */
assert(btr_no_parent(btrn));
- ret = -E_WRITE_COMMON_EOF;
if (!pad)
goto err;
/* wait until pending frames are played */
if (!pad)
goto err;
/* wait until pending frames are played */
in_bytes = btr_next_buffer(btrn, (char **)&in);
len = in_bytes / 2;
if (len == 0) { /* eof and in_bytes == 1 */
in_bytes = btr_next_buffer(btrn, (char **)&in);
len = in_bytes / 2;
if (len == 0) { /* eof and in_bytes == 1 */
if (frames > 0)
break;
/* eof and less than a single frame available */
if (frames > 0)
break;
/* eof and less than a single frame available */
- ret = -E_WRITE_COMMON_EOF;
if (!wn->btrn) {
if (!pawd->thread_btrn) {
pthread_join(pawd->thread, NULL);
if (!wn->btrn) {
if (!pawd->thread_btrn) {
pthread_join(pawd->thread, NULL);
}
PARA_INFO_LOG("waiting for play thread to terminate\n");
return 0;
}
PARA_INFO_LOG("waiting for play thread to terminate\n");
return 0;
ret = recv_bin_buffer(at->fd, buf, bufsize);
PARA_DEBUG_LOG("recv: %d\n", ret);
if (ret == 0)
ret = recv_bin_buffer(at->fd, buf, bufsize);
PARA_DEBUG_LOG("recv: %d\n", ret);
if (ret == 0)
if (ret < 0)
goto out;
btr_add_output(buf, ret, at->btrn);
if (ret < 0)
goto out;
btr_add_output(buf, ret, at->btrn);
if (type != BTR_NT_LEAF && btr_no_children(btrn))
return -E_BTR_NO_CHILD;
if (type != BTR_NT_ROOT && btr_eof(btrn))
if (type != BTR_NT_LEAF && btr_no_children(btrn))
return -E_BTR_NO_CHILD;
if (type != BTR_NT_ROOT && btr_eof(btrn))
if (btr_get_output_queue_size(btrn) > BTRN_MAX_PENDING)
return 0;
if (btr_get_output_queue_size(btrn) > BTRN_MAX_PENDING)
return 0;
/* these are not errors */
case -E_SERVER_CMD_SUCCESS:
case -E_EOF:
/* these are not errors */
case -E_SERVER_CMD_SUCCESS:
case -E_EOF:
- case -E_SERVER_EOF:
- case -E_BTR_EOF:
ret = 0;
break;
default: ret = -E_SERVER_CMD_FAILURE;
ret = 0;
break;
default: ret = -E_SERVER_CMD_FAILURE;
char *buf2;
size_t sz;
ret = btr_node_status(ct->btrn[1], 0, BTR_NT_LEAF);
char *buf2;
size_t sz;
ret = btr_node_status(ct->btrn[1], 0, BTR_NT_LEAF);
- if (ret == -E_BTR_EOF) {
/* empty blob data packet indicates EOF */
PARA_INFO_LOG("blob sent\n");
ret = send_sb(ct, 1, NULL, 0, SBD_BLOB_DATA, true);
if (ret >= 0)
/* empty blob data packet indicates EOF */
PARA_INFO_LOG("blob sent\n");
ret = send_sb(ct, 1, NULL, 0, SBD_BLOB_DATA, true);
if (ret >= 0)
}
if (ret < 0)
goto close1;
}
if (ret < 0)
goto close1;
btr_merge(btrn, fn->min_iqs);
length = btr_next_buffer(btrn, &inbuf) & ~(size_t)1;
if (length == 0) { /* eof and 1 byte available */
btr_merge(btrn, fn->min_iqs);
length = btr_next_buffer(btrn, &inbuf) & ~(size_t)1;
if (length == 0) { /* eof and 1 byte available */
goto err;
}
ip = (int16_t *)inbuf;
goto err;
}
ip = (int16_t *)inbuf;
PARA_ERROR(ALSA_MIX_OPEN, "could not open mixer"), \
PARA_ERROR(ALSA_MIX_RANGE, "value control element out of range"), \
PARA_ERROR(ALSA_MIX_SET_VAL, "could not set control element state"), \
PARA_ERROR(ALSA_MIX_OPEN, "could not open mixer"), \
PARA_ERROR(ALSA_MIX_RANGE, "value control element out of range"), \
PARA_ERROR(ALSA_MIX_SET_VAL, "could not set control element state"), \
- PARA_ERROR(AMP_EOF, "amp: end of file"), \
PARA_ERROR(AMP_ZERO_AMP, "no amplification necessary"), \
PARA_ERROR(AO_APPEND_OPTION, "ao append option: memory allocation failure"), \
PARA_ERROR(AO_BAD_DRIVER, "ao: invalid driver"), \
PARA_ERROR(AO_BAD_OPTION, "ao option is not of type key:value"), \
PARA_ERROR(AO_DEFAULT_DRIVER, "ao: no usable output device"), \
PARA_ERROR(AMP_ZERO_AMP, "no amplification necessary"), \
PARA_ERROR(AO_APPEND_OPTION, "ao append option: memory allocation failure"), \
PARA_ERROR(AO_BAD_DRIVER, "ao: invalid driver"), \
PARA_ERROR(AO_BAD_OPTION, "ao option is not of type key:value"), \
PARA_ERROR(AO_DEFAULT_DRIVER, "ao: no usable output device"), \
- PARA_ERROR(AO_EOF, "ao: end of file"), \
PARA_ERROR(AO_FILE_NOT_SUPP, "ao: file io drivers not supported"), \
PARA_ERROR(AO_OPEN_LIVE, "ao: could not open audio device"), \
PARA_ERROR(AO_PLAY, "ao_play() failed"), \
PARA_ERROR(AO_FILE_NOT_SUPP, "ao: file io drivers not supported"), \
PARA_ERROR(AO_OPEN_LIVE, "ao: could not open audio device"), \
PARA_ERROR(AO_PLAY, "ao_play() failed"), \
PARA_ERROR(ATOI_OVERFLOW, "value too large"), \
PARA_ERROR(ATTR_SYNTAX, "attribute syntax error"), \
PARA_ERROR(ATT_TABLE_FULL, "no more space left in attribute table"), \
PARA_ERROR(ATOI_OVERFLOW, "value too large"), \
PARA_ERROR(ATTR_SYNTAX, "attribute syntax error"), \
PARA_ERROR(ATT_TABLE_FULL, "no more space left in attribute table"), \
- PARA_ERROR(AUDIOC_EOF, "audioc: end of file"), \
PARA_ERROR(AUDIOD_OFF, "audiod switched off"), \
PARA_ERROR(AUDIOD_SIGNAL, "caught deadly signal"), \
PARA_ERROR(AUDIOD_TERM, "terminating on user request"), \
PARA_ERROR(AUDIOD_OFF, "audiod switched off"), \
PARA_ERROR(AUDIOD_SIGNAL, "caught deadly signal"), \
PARA_ERROR(AUDIOD_TERM, "terminating on user request"), \
PARA_ERROR(BIGNUM, "bignum error"), \
PARA_ERROR(BLINDING, "failed to activate key blinding"), \
PARA_ERROR(BLOB_SYNTAX, "blob syntax error"), \
PARA_ERROR(BIGNUM, "bignum error"), \
PARA_ERROR(BLINDING, "failed to activate key blinding"), \
PARA_ERROR(BLOB_SYNTAX, "blob syntax error"), \
- PARA_ERROR(BTR_EOF, "buffer tree: end of file"), \
PARA_ERROR(BTR_NAVAIL, "btr node: value currently unavailable"), \
PARA_ERROR(BTR_NO_CHILD, "btr node has no children"), \
PARA_ERROR(CHILD_CONTEXT, "now running in child context"), \
PARA_ERROR(BTR_NAVAIL, "btr node: value currently unavailable"), \
PARA_ERROR(BTR_NO_CHILD, "btr node has no children"), \
PARA_ERROR(CHILD_CONTEXT, "now running in child context"), \
PARA_ERROR(CLIENT_SYNTAX, "syntax error"), \
PARA_ERROR(CLIENT_WRITE, "client write error"), \
PARA_ERROR(COMMAND_SYNTAX, "syntax error in command"), \
PARA_ERROR(CLIENT_SYNTAX, "syntax error"), \
PARA_ERROR(CLIENT_WRITE, "client write error"), \
PARA_ERROR(COMMAND_SYNTAX, "syntax error in command"), \
- PARA_ERROR(COMPRESS_EOF, "compress: end of file"), \
PARA_ERROR(CREATE_OPUS_DECODER, "could not create opus decoder"), \
PARA_ERROR(DCCP_OVERRUN, "dccp output buffer buffer overrun"), \
PARA_ERROR(DECRYPT, "decrypt error"), \
PARA_ERROR(CREATE_OPUS_DECODER, "could not create opus decoder"), \
PARA_ERROR(DCCP_OVERRUN, "dccp output buffer buffer overrun"), \
PARA_ERROR(DECRYPT, "decrypt error"), \
PARA_ERROR(EOF, "end of file"), \
PARA_ERROR(EOP, "end of playlist"), \
PARA_ERROR(FEC_BAD_IDX, "invalid index vector"), \
PARA_ERROR(EOF, "end of file"), \
PARA_ERROR(EOP, "end of playlist"), \
PARA_ERROR(FEC_BAD_IDX, "invalid index vector"), \
- PARA_ERROR(FECDEC_EOF, "received eof packet"), \
PARA_ERROR(FECDEC_OVERRUN, "fecdec output buffer overrun"), \
PARA_ERROR(FEC_PARMS, "invalid fec parameters"), \
PARA_ERROR(FEC_PIVOT, "pivot column not found"), \
PARA_ERROR(FECDEC_OVERRUN, "fecdec output buffer overrun"), \
PARA_ERROR(FEC_PARMS, "invalid fec parameters"), \
PARA_ERROR(FEC_PIVOT, "pivot column not found"), \
PARA_ERROR(FLAC_CHAIN_READ, "could not read meta chain"), \
PARA_ERROR(FLACDEC_DECODER_ALLOC, "could not allocate stream decoder"), \
PARA_ERROR(FLACDEC_DECODER_INIT, "could not init stream decoder"), \
PARA_ERROR(FLAC_CHAIN_READ, "could not read meta chain"), \
PARA_ERROR(FLACDEC_DECODER_ALLOC, "could not allocate stream decoder"), \
PARA_ERROR(FLACDEC_DECODER_INIT, "could not init stream decoder"), \
- PARA_ERROR(FLACDEC_EOF, "flacdec encountered end of file condition"), \
PARA_ERROR(FLAC_DECODE_POS, "could not get decode position"), \
PARA_ERROR(FLAC_ITER_ALLOC, "could not allocate meta iterator"), \
PARA_ERROR(FLAC_REPLACE_COMMENT, "could not replace vorbis comment"), \
PARA_ERROR(FLAC_DECODE_POS, "could not get decode position"), \
PARA_ERROR(FLAC_ITER_ALLOC, "could not allocate meta iterator"), \
PARA_ERROR(FLAC_REPLACE_COMMENT, "could not replace vorbis comment"), \
PARA_ERROR(HEADER_BITRATE, "invalid header bitrate"), \
PARA_ERROR(HEADER_FREQ, "invalid header frequency"), \
PARA_ERROR(HTTP_RECV_OVERRUN, "http_recv: output buffer overrun"), \
PARA_ERROR(HEADER_BITRATE, "invalid header bitrate"), \
PARA_ERROR(HEADER_FREQ, "invalid header frequency"), \
PARA_ERROR(HTTP_RECV_OVERRUN, "http_recv: output buffer overrun"), \
- PARA_ERROR(I9E_EOF, "end of input"), \
PARA_ERROR(I9E_SETUPTERM, "failed to set up terminal"), \
PARA_ERROR(I9E_TERM_RQ, "received termination request"), \
PARA_ERROR(ID3_ATTACH, "could not attach id3 frame"), \
PARA_ERROR(I9E_SETUPTERM, "failed to set up terminal"), \
PARA_ERROR(I9E_TERM_RQ, "received termination request"), \
PARA_ERROR(ID3_ATTACH, "could not attach id3 frame"), \
PARA_ERROR(MISSING_COLON, "syntax error: missing colon"), \
PARA_ERROR(MOOD_PARSE, "mood parse error"), \
PARA_ERROR(MP3DEC_CORRUPT, "too many corrupt frames"), \
PARA_ERROR(MISSING_COLON, "syntax error: missing colon"), \
PARA_ERROR(MOOD_PARSE, "mood parse error"), \
PARA_ERROR(MP3DEC_CORRUPT, "too many corrupt frames"), \
- PARA_ERROR(MP3DEC_EOF, "mp3dec: end of file"), \
PARA_ERROR(MP3_INFO, "could not read mp3 info"), \
PARA_ERROR(MP4_READ, "mp4: read error or unexpected end of file"), \
PARA_ERROR(MP4_CORRUPT, "invalid/corrupt mp4 file"), \
PARA_ERROR(MP3_INFO, "could not read mp3 info"), \
PARA_ERROR(MP4_READ, "mp4: read error or unexpected end of file"), \
PARA_ERROR(MP4_CORRUPT, "invalid/corrupt mp4 file"), \
PARA_ERROR(PRIVATE_KEY, "can not read private key"), \
PARA_ERROR(QUEUE, "packet queue overrun"), \
PARA_ERROR(READ_PATTERN, "did not read expected pattern"), \
PARA_ERROR(PRIVATE_KEY, "can not read private key"), \
PARA_ERROR(QUEUE, "packet queue overrun"), \
PARA_ERROR(READ_PATTERN, "did not read expected pattern"), \
- PARA_ERROR(RECV_EOF, "end of file"), \
PARA_ERROR(RECVMSG, "recvmsg() failed"), \
PARA_ERROR(REGEX, "regular expression error"), \
PARA_ERROR(RECVMSG, "recvmsg() failed"), \
PARA_ERROR(REGEX, "regular expression error"), \
- PARA_ERROR(RESAMPLE_EOF, "resample filter: end of file"), \
PARA_ERROR(RSA, "RSA error"), \
PARA_ERROR(RSA_DECODE, "RSA decoding error"), \
PARA_ERROR(SB_PACKET_SIZE, "invalid sideband packet size or protocol error"), \
PARA_ERROR(RSA, "RSA error"), \
PARA_ERROR(RSA_DECODE, "RSA decoding error"), \
PARA_ERROR(SB_PACKET_SIZE, "invalid sideband packet size or protocol error"), \
PARA_ERROR(SERVER_CMD_FAILURE, "command failed"), \
PARA_ERROR(SERVER_CMD_SUCCESS, "command terminated successfully"), \
PARA_ERROR(SERVER_CRASH, "para_server crashed -- can not live without it"), \
PARA_ERROR(SERVER_CMD_FAILURE, "command failed"), \
PARA_ERROR(SERVER_CMD_SUCCESS, "command terminated successfully"), \
PARA_ERROR(SERVER_CRASH, "para_server crashed -- can not live without it"), \
- PARA_ERROR(SERVER_EOF, "connection closed by para_server"), \
PARA_ERROR(SEXP_BUILD, "could not build S-expression"), \
PARA_ERROR(SEXP_DECRYPT, "could not decrypt S-expression"), \
PARA_ERROR(SEXP_ENCRYPT, "could not encrypt S-expression"), \
PARA_ERROR(SEXP_BUILD, "could not build S-expression"), \
PARA_ERROR(SEXP_DECRYPT, "could not decrypt S-expression"), \
PARA_ERROR(SEXP_ENCRYPT, "could not encrypt S-expression"), \
PARA_ERROR(VORBIS_COMMENTHEADER, "could not create vorbis comment header"), \
PARA_ERROR(VORBIS, "vorbis synthesis header-in error (not vorbis?)"), \
PARA_ERROR(WAV_BAD_FC, "invalid filter configuration"), \
PARA_ERROR(VORBIS_COMMENTHEADER, "could not create vorbis comment header"), \
PARA_ERROR(VORBIS, "vorbis synthesis header-in error (not vorbis?)"), \
PARA_ERROR(WAV_BAD_FC, "invalid filter configuration"), \
- PARA_ERROR(WAV_EOF, "wav filter: end of file"), \
PARA_ERROR(WAV_SUCCESS, "successfully wrote wav header"), \
PARA_ERROR(WMA_BAD_PARAMS, "invalid WMA parameters"), \
PARA_ERROR(WMA_BAD_SUPERFRAME, "invalid superframe"), \
PARA_ERROR(WMA_BLOCK_SIZE, "invalid block size"), \
PARA_ERROR(WAV_SUCCESS, "successfully wrote wav header"), \
PARA_ERROR(WMA_BAD_PARAMS, "invalid WMA parameters"), \
PARA_ERROR(WMA_BAD_SUPERFRAME, "invalid superframe"), \
PARA_ERROR(WMA_BLOCK_SIZE, "invalid block size"), \
- PARA_ERROR(WMADEC_EOF, "wmadec: end of file"), \
PARA_ERROR(WMA_NO_GUID, "audio stream guid not found"), \
PARA_ERROR(WMA_OUTPUT_SPACE, "insufficient output space"), \
PARA_ERROR(WMA_NO_GUID, "audio stream guid not found"), \
PARA_ERROR(WMA_OUTPUT_SPACE, "insufficient output space"), \
- PARA_ERROR(WRITE_COMMON_EOF, "end of file"), \
/**
* This is temporarily defined to expand to its first argument (prefixed by
/**
* This is temporarily defined to expand to its first argument (prefixed by
h->bos = read_u8(buf + 22);
h->header_stream = read_u8(buf + 23);
if (!memcmp(buf, FEC_EOF_PACKET, FEC_EOF_PACKET_LEN))
h->bos = read_u8(buf + 22);
h->header_stream = read_u8(buf + 23);
if (!memcmp(buf, FEC_EOF_PACKET, FEC_EOF_PACKET_LEN))
// PARA_DEBUG_LOG("group %u, slize %u, slices per group: %u\n",
// h->group_num, h->slice_num, h->slices_per_group);
return 1;
// PARA_DEBUG_LOG("group %u, slize %u, slices per group: %u\n",
// h->group_num, h->slice_num, h->slices_per_group);
return 1;
if (output_queue_full(btrn))
return 0;
ret = btr_node_status(btrn, fn->min_iqs, BTR_NT_INTERNAL);
if (output_queue_full(btrn))
return 0;
ret = btr_node_status(btrn, fn->min_iqs, BTR_NT_INTERNAL);
- if (ret < 0 && ret != -E_BTR_EOF) /* fatal error */
+ if (ret < 0 && ret != -E_EOF) /* fatal error */
goto out;
if (ret <= 0 && !pfd->have_more) /* nothing to do */
goto out;
goto out;
if (ret <= 0 && !pfd->have_more) /* nothing to do */
goto out;
pfd->have_more = false;
FLAC__stream_decoder_process_single(pfd->decoder);
state = FLAC__stream_decoder_get_state(pfd->decoder);
pfd->have_more = false;
FLAC__stream_decoder_process_single(pfd->decoder);
state = FLAC__stream_decoder_get_state(pfd->decoder);
if (state == FLAC__STREAM_DECODER_END_OF_STREAM)
goto out;
if (state == FLAC__STREAM_DECODER_ABORTED) {
if (state == FLAC__STREAM_DECODER_END_OF_STREAM)
goto out;
if (state == FLAC__STREAM_DECODER_ABORTED) {
char *buf;
size_t sz, consumed = 0;
char *buf;
size_t sz, consumed = 0;
if (i9ep->input_eof)
goto rm_btrn;
ret = -E_I9E_TERM_RQ;
if (i9ep->input_eof)
goto rm_btrn;
ret = -E_I9E_TERM_RQ;
goto rm_btrn;
}
if (ret == 0) {
goto rm_btrn;
}
if (ret == 0) {
goto rm_btrn;
}
buf[1] = '\0';
goto rm_btrn;
}
buf[1] = '\0';
mp3dec_consume(btrn, &pmd->stream, len);
if (pmd->stream.error == MAD_ERROR_BUFLEN) {
if (len == iqs && btr_no_parent(btrn)) {
mp3dec_consume(btrn, &pmd->stream, len);
if (pmd->stream.error == MAD_ERROR_BUFLEN) {
if (len == iqs && btr_no_parent(btrn)) {
goto err;
}
fn->min_iqs += 100;
goto err;
}
fn->min_iqs += 100;
goto err;
mad_stream_sync(&pmd->stream);
if (pmd->stream.error == MAD_ERROR_BUFLEN) {
goto err;
mad_stream_sync(&pmd->stream);
if (pmd->stream.error == MAD_ERROR_BUFLEN) {
if (len == iqs && btr_no_parent(btrn))
goto err;
fn->min_iqs += 100;
if (len == iqs && btr_no_parent(btrn))
goto err;
fn->min_iqs += 100;
ret = btr_node_status(btrn, fn->min_iqs, BTR_NT_INTERNAL);
if (ret < 0) {
ret = btr_node_status(btrn, fn->min_iqs, BTR_NT_INTERNAL);
if (ret < 0) {
- if (ret != -E_BTR_EOF) /* fatal error */
+ if (ret != -E_EOF) /* fatal error */
goto out;
if (fn->min_iqs == 0 && !pod->have_more) /* EOF */
goto out;
goto out;
if (fn->min_iqs == 0 && !pod->have_more) /* EOF */
goto out;
ret = btr_node_status(btrn, fn->min_iqs, BTR_NT_INTERNAL);
if (ret < 0) {
ret = btr_node_status(btrn, fn->min_iqs, BTR_NT_INTERNAL);
if (ret < 0) {
- if (ret != -E_BTR_EOF) /* fatal error */
+ if (ret != -E_EOF) /* fatal error */
goto out;
if (!ctx->have_more) /* EOF */
goto out;
goto out;
if (!ctx->have_more) /* EOF */
goto out;
bytes = btr_next_buffer(btrn, &data);
frames = bytes / powd->bytes_per_frame;
if (!frames) { /* eof and less than a single frame available */
bytes = btr_next_buffer(btrn, &data);
frames = bytes / powd->bytes_per_frame;
if (!frames) { /* eof and less than a single frame available */
- ret = -E_WRITE_COMMON_EOF;
return 0;
if (task_status(pt->rn.task) >= 0)
return 0;
return 0;
if (task_status(pt->rn.task) >= 0)
return 0;
- if (err == -E_BTR_EOF || err == -E_RECV_EOF || err == -E_EOF
- || err == -E_WRITE_COMMON_EOF)
}
btr_merge(btrn, fn->min_iqs);
in_bytes = btr_next_buffer(btrn, (char **)&in);
}
btr_merge(btrn, fn->min_iqs);
in_bytes = btr_next_buffer(btrn, (char **)&in);
num_frames = in_bytes / 2 / ctx->channels;
if (num_frames == 0)
goto out;
num_frames = in_bytes / 2 / ctx->channels;
if (num_frames == 0)
goto out;
if (t->status >= 0)
return 0;
ret = t->status;
if (t->status >= 0)
return 0;
ret = t->status;
- PARA_INFO_LOG("reaping %s (%s)\n", t->name, para_strerror(-ret));
+ PARA_INFO_LOG("reaping %s: %s\n", t->name, para_strerror(-ret));
/*
* With list_for_each_entry_safe() it is only safe to remove the
* _current_ list item. Since we are being called from the loop in
/*
* With list_for_each_entry_safe() it is only safe to remove the
* _current_ list item. Since we are being called from the loop in
ret = -E_SYNC_COMPLETE; /* success */
goto out;
fail:
ret = -E_SYNC_COMPLETE; /* success */
goto out;
fail:
PARA_WARNING_LOG("%s\n", para_strerror(-ret));
out:
sync_close_buddies(ctx);
PARA_WARNING_LOG("%s\n", para_strerror(-ret));
out:
sync_close_buddies(ctx);
if (memcmp(iov[0].iov_base, FEC_EOF_PACKET,
FEC_EOF_PACKET_LEN) != 0)
return 0;
if (memcmp(iov[0].iov_base, FEC_EOF_PACKET,
FEC_EOF_PACKET_LEN) != 0)
return 0;
}
if (memcmp(iov[0].iov_base, FEC_EOF_PACKET, iov[0].iov_len) != 0)
return 0;
if (memcmp(iov[1].iov_base, &FEC_EOF_PACKET[iov[0].iov_len],
FEC_EOF_PACKET_LEN - iov[0].iov_len) != 0)
return 0;
}
if (memcmp(iov[0].iov_base, FEC_EOF_PACKET, iov[0].iov_len) != 0)
return 0;
if (memcmp(iov[1].iov_base, &FEC_EOF_PACKET[iov[0].iov_len],
FEC_EOF_PACKET_LEN - iov[0].iov_len) != 0)
return 0;
}
static int udp_recv_post_monitor(__a_unused struct sched *s, void *context)
}
static int udp_recv_post_monitor(__a_unused struct sched *s, void *context)
int32_t rate, ch;
if (iqs == 0) {
int32_t rate, ch;
if (iqs == 0) {
if (btr_no_parent(btrn))
goto err;
return 0;
if (btr_no_parent(btrn))
goto err;
return 0;
return 0;
btr_merge(btrn, fn->min_iqs);
len = btr_next_buffer(btrn, &in);
return 0;
btr_merge(btrn, fn->min_iqs);
len = btr_next_buffer(btrn, &in);
if (len < fn->min_iqs)
goto err;
if (!pwd) {
if (len < fn->min_iqs)
goto err;
if (!pwd) {
struct writer_node *wn = wns + j;
ts = task_status(wn->task);
assert(ts < 0);
struct writer_node *wn = wns + j;
ts = task_status(wn->task);
assert(ts < 0);
- if (ts != -E_WRITE_COMMON_EOF && ts != -E_BTR_EOF) {
const char *name = writer_name(wn->wid);
PARA_ERROR_LOG("%s: %s\n", name,
para_strerror(-ts));
const char *name = writer_name(wn->wid);
PARA_ERROR_LOG("%s: %s\n", name,
para_strerror(-ts));