- A fix for an old bug that could cause the server to crash or report
garbage in its status output.
- New para_play option: --end-of-playlist
+- Streaming m4a files over udp has been improved.
--------------------------------------
0.6.2 (2018-06-30) "elastic diversity"
}
ret = open_afs_tables();
if (ret < 0)
- para_printf(&aca->pbout, "cannot open afs tables\n");
+ para_printf(&aca->pbout, "cannot open afs tables: %s\n",
+ para_strerror(-ret));
out:
return ret;
}
int i;
size_t sz;
- if (!ct->data || ct->size < 4) {
+ if (!ct->data || ct->size < 4 * (afhi->chunks_total + 1)) {
afhi->chunk_table = NULL;
return;
}
int get_afhi_of_row(const struct osl_row *row, struct afh_info *afhi)
{
struct osl_object obj;
- int ret = osl(osl_get_object(audio_file_table, row, AFTCOL_AFHI,
- &obj));
+ int ret;
+
+ assert(row);
+ ret = osl(osl_get_object(audio_file_table, row, AFTCOL_AFHI, &obj));
if (ret < 0)
return ret;
load_afhi(obj.data, afhi);
PARA_NOTICE_LOG("current audio file hash lookup: success\n");
return 1;
}
- PARA_NOTICE_LOG("failed to open audio file table\n");
audio_file_table = NULL;
- if (ret == -OSL_ERRNO_TO_PARA_ERROR(E_OSL_NOENT))
+ if (ret == -OSL_ERRNO_TO_PARA_ERROR(E_OSL_NOENT)) {
+ PARA_WARNING_LOG("no audio file table\n");
return 1;
+ }
+ PARA_NOTICE_LOG("failed to open audio file table\n");
return ret;
}
/*
* These events are rare. We don't bother to check whether the
* current status items are affected and simply recreate them
- * every time.
+ * whenever an audio file is open.
*/
+ if (!current_aft_row)
+ return 0;
ret = get_afhi_of_row(current_aft_row,
&status_item_ls_data.afhi);
if (ret < 0)
else if (ret > 0)
para_fd_set(ct->scc.fd, &s->wfds, &s->max_fileno);
}
- /* fallthrough */
+ __attribute__ ((fallthrough));
case CL_EXECUTING:
if (ct->btrn[0]) {
ret = btr_node_status(ct->btrn[0], 0, BTR_NT_ROOT);
btr_consume(ct->btrn[1], sz);
}
}
- /* fall through */
+ __attribute__ ((fallthrough));
case CL_EXECUTING:
if (ct->btrn[0]) {
ret = btr_node_status(ct->btrn[0], 0, BTR_NT_ROOT);
/**
* Deallocate a stream cipher structure.
*
- * \param sc A stream cipher previously obtained by sc_new().
+ * \param sc A stream cipher previously obtained by \ref sc_new().
*/
void sc_free(struct stream_cipher *sc);
* will be filled by the function with the ascii representation of the hash
* value given by \a hash, and a terminating \p NULL byte.
*/
-void hash_to_asc(unsigned char *hash, char *asc);
+void hash_to_asc(const unsigned char *hash, char *asc);
/**
* Compare two hashes.
* \return 1, -1, or zero, depending on whether \a h1 is greater than,
* less than or equal to h2, respectively.
*/
-int hash_compare(unsigned char *h1, unsigned char *h2);
+int hash_compare(const unsigned char *h1, const unsigned char *h2);
return 1;
}
-void hash_to_asc(unsigned char *hash, char *asc)
+void hash_to_asc(const unsigned char *hash, char *asc)
{
int i;
const char hexchar[] = "0123456789abcdef";
asc[2 * HASH_SIZE] = '\0';
}
-int hash_compare(unsigned char *h1, unsigned char *h2)
+int hash_compare(const unsigned char *h1, const unsigned char *h2)
{
int i;
OPT_RESULT(DCCP_LISTEN_ADDRESS),
OPT_UINT32_VAL(DCCP_PORT), OPT_UINT32_VAL(DCCP_MAX_CLIENTS),
OPT_GIVEN(DCCP_DEFAULT_DENY));
+ if (OPT_GIVEN(DCCP_NO_AUTOSTART))
+ return;
generic_com_on(dss, IPPROTO_DCCP);
}
}
/* taken from mutt */
-static char *km_keyname(int c)
+static const char *km_keyname(int c)
{
static char buf[10];
{
int i;
const struct lls_opt_result *lor = OPT_RESULT(KEY_MAP);
+ const char *keyname = km_keyname(c);
/* first check user-defined key bindings */
FOR_EACH_KEY_MAP(i) {
free(tmp);
return;
}
- if (strcmp(tmp, km_keyname(c))) {
+ if (strcmp(tmp, keyname)) {
free(tmp);
continue;
}
}
/* not found, check internal key bindings */
for (i = 0; command_list[i].handler; i++) {
- if (!strcmp(km_keyname(c), command_list[i].key)) {
+ if (!strcmp(keyname, command_list[i].key)) {
command_list[i].handler();
return;
}
}
print_in_bar(COLOR_ERRMSG, "key '%s' is not bound, press ? for help",
- km_keyname(c));
+ keyname);
}
static int input_post_select(__a_unused struct sched *s,
d[SI_format].align = CENTER;
d[SI_format].x = 42;
d[SI_format].y = 17;
- d[SI_format].len = 18;
+ d[SI_format].len = 16;
d[SI_num_played].prefix = "#";
d[SI_num_played].postfix = "";
[help]
See --http-access for details.
[/help]
+ [option dccp-no-autostart]
+ summary = do not open the DCCP port on startup
+ [help]
+ This is like --http-no-autostart but applies to the dccp sender.
+ [/help]
[option dccp-max-clients]
summary = maximal number of simultaneous dccp connections
arg_info = required_arg
struct mp_context *ctx;
struct yy_buffer_state *buffer_state;
+ *result = NULL;
if (!definition || nbytes == 0) { /* dummy mood */
if (errmsg)
*errmsg = NULL;
- *result = NULL;
return 0;
}
ctx = para_calloc(sizeof(*ctx));
int ret;
ret = task_get_notification(fn->task);
+ if (ret < 0)
+ return ret;
+ ret = btr_node_status(btrn, size, BTR_NT_INTERNAL);
if (ret < 0)
return ret;
if (ppd->barrier.tv_sec == 0)