From: Andre Noll Date: Thu, 1 Nov 2007 14:55:30 +0000 (+0100) Subject: com_add: Only send output if send_callback_request() returned positive. X-Git-Tag: v0.3.0~156 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=443e2564635fa60b561666db709f54901c2adf6f;p=paraslash.git com_add: Only send output if send_callback_request() returned positive. --- diff --git a/aft.c b/aft.c index 93c96cb4..909da6aa 100644 --- 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)