com_add: Only send output if send_callback_request() returned positive.
authorAndre Noll <maan@systemlinux.org>
Thu, 1 Nov 2007 14:55:30 +0000 (15:55 +0100)
committerAndre Noll <maan@systemlinux.org>
Thu, 1 Nov 2007 14:55:30 +0000 (15:55 +0100)
aft.c

diff --git a/aft.c b/aft.c
index 93c96cb..909da6a 100644 (file)
--- a/aft.c
+++ b/aft.c
@@ -1702,7 +1702,7 @@ static int add_one_audio_file(const char *path, const void *private_data)
        save_audio_file_info(hash, path, afhi_ptr, pad->flags, format_num, &obj);
        /* Ask afs to consider this entry for adding. */
        ret = send_callback_request(com_add_callback, &obj, &result);
-       if (ret >= 0 && result.data && result.size) {
+       if (ret > 0) {
                ret2 = send_va_buffer(pad->fd, "%s", (char *)result.data);
                free(result.data);
                if (ret >= 0 && ret2 < 0)