If para_audiod can not parse a status item received from para_server,
it currently prints
task_notify: notifying task client: audiod switched off
btr_remove_node: removing btr node client from buffer tree
unregister_task: unregistering client (audiod switched off)
This is misleading at best. The error message for status timeouts has
the same problem. This patch makes para_audiod print meaningful error
messages in both cases.
struct timeval diff;
tv_diff(now, &st->last_status_read, &diff);
if (diff.tv_sec > 61)
- task_notify(&st->ct->task, E_AUDIOD_OFF);
+ task_notify(&st->ct->task, E_STATUS_TIMEOUT);
goto out;
}
btr_merge(st->btrn, st->min_iqs);
sz = btr_next_buffer(st->btrn, &buf);
ret = for_each_stat_item(buf, sz, update_item);
if (ret < 0) {
- task_notify(&st->ct->task, E_AUDIOD_OFF);
+ task_notify(&st->ct->task, -ret);
goto out;
}
if (sz != ret) {
PARA_ERROR(UNSUPPORTED_AUDIO_FORMAT, "given audio format not supported"), \
PARA_ERROR(NOT_PLAYING, "not playing"), \
PARA_ERROR(AUDIOD_OFF, "audiod switched off"), \
+ PARA_ERROR(STATUS_TIMEOUT, "status item timeout"), \
#define AUDIOD_COMMAND_ERRORS \