X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=write_common.c;h=7131a94042dae3b989a73ee5a1b8cd4c84bf2b02;hp=6cd7ed22cabf94eafdfd5019b06d366262378c5e;hb=071538830bc5200f90b22576945687a2e43694a0;hpb=c773ec0d537d239e2eebe2d77a786f0ba49fdc22 diff --git a/write_common.c b/write_common.c index 6cd7ed22..7131a940 100644 --- a/write_common.c +++ b/write_common.c @@ -153,7 +153,15 @@ static void get_btr_value(struct btr_node *btrn, const char *cmd, char *buf = NULL; int ret = btr_exec_up(btrn, cmd, &buf); - assert(ret >= 0); + if (ret < 0) { + /* + * This really should not happen. It means one of our parent + * nodes died unexpectedly. Proceed with fingers crossed. + */ + PARA_CRIT_LOG("cmd %s: %s\n", cmd, para_strerror(-ret)); + *result = 0; + return; + } ret = para_atoi32(buf, result); assert(ret >= 0); free(buf); @@ -163,7 +171,7 @@ static void get_btr_value(struct btr_node *btrn, const char *cmd, * Ask parent btr nodes for the sample rate of the current stream. * * \param btrn Where to start the search. - * \param result. Filled in by this function. + * \param result Filled in by this function. * * This function is assumed to succeed and terminates on errors. */