On 07/27/2012 11:22 AM, Yunkai Zhang wrote: > The top code, such as cluster_shutdown/cluster_recover/..., need to > use -1 and 1 to distinguish two error types: > 1) failed to connect or failed to call exe_req() > 2) success to call exe_re(), but the response's result isn't SD_RES_SUCCESS. These two cases handling can be done in send_light_req(). why bother propagate it to upper code? Eorror handling (eprintf) inside the send_light_req() will make the code more simpler. -1 to indicate for error case is enough for upper code. Thanks, Yuan |