From: Andre Noll Date: Tue, 22 Dec 2015 15:36:45 +0000 (+0000) Subject: aft.c: Check for osl errors in com_add_callback(). X-Git-Tag: v0.5.6~79 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=402bda88d8556619738ebde95cbcacac2e9f1169 aft.c: Check for osl errors in com_add_callback(). We only want to issue the afs event if the row was successfully added to the audio file table. --- diff --git a/aft.c b/aft.c index 7f9e786c..f5830dac 100644 --- a/aft.c +++ b/aft.c @@ -1745,6 +1745,8 @@ static int com_add_callback(struct afs_callback_arg *aca) objs[AFTCOL_AFSI].size = AFSI_SIZE; save_afsi(&default_afsi, &objs[AFTCOL_AFSI]); ret = osl(osl_add_and_get_row(audio_file_table, objs, &aft_row)); + if (ret < 0) + goto out; ret = afs_event(AUDIO_FILE_ADD, &aca->pbout, aft_row); out: if (ret < 0)