aft: Add missing add event.
authorAndre Noll <maan@systemlinux.org>
Sun, 21 Oct 2007 12:24:19 +0000 (14:24 +0200)
committerAndre Noll <maan@systemlinux.org>
Sun, 21 Oct 2007 12:24:19 +0000 (14:24 +0200)
aft.c

diff --git a/aft.c b/aft.c
index 46d6729280cf8b90ce47c5d9194c2cace22c2f81..3666a2eb90de28431dd25b5adbac41503bf80d92 100644 (file)
--- a/aft.c
+++ b/aft.c
@@ -1500,8 +1500,8 @@ out:
                return 0;
        result->data = msg.buf;
        result->size = msg.size;
+       afs_event(AUDIO_FILE_ADD, &msg, aft_row);
        return 1;
-       // mood_update_audio_file(aft_row, NULL);
 }
 
 struct private_add_data {
@@ -1965,7 +1965,7 @@ int com_afs_rm(int fd, int argc,  char * const * const argv)
        if (ret > 0) {
                send_buffer(fd, (char *)result.data);
                free(result.data);
-       } else
+       } else if (ret < 0)
                send_va_buffer(fd, "%s\n", PARA_STRERROR(-ret));
        return ret;
 }