From: Andre Noll Date: Mon, 21 Jan 2008 08:24:16 +0000 (+0100) Subject: Be more careful on command exit. X-Git-Tag: v0.3.1~68 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=4a33aa7ad93857d0c6b5ea24983e12b1619b10c0;hp=4a33aa7ad93857d0c6b5ea24983e12b1619b10c0 Be more careful on command exit. If the callback returned zero, there's nothing to do. If it returned positive, we have to send out the result buffer and must free it afterwards. Sending the buffer may well lead to an error condition, so always check the return value of the corresponding call to send_buffer(). Finally, it the command handler returned a negative value, we have to send an error message to the client which might give rise to another error (if sending the errror message failed). In this case, ignore the send errror and return the previous error value. ---