On Fri, Jul 27, 2012 at 11:35 AM, Liu Yuan <namei.u...@gmail.com> wrote: > 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
I just want to keep the new code consistent with the original version. The upper code, such as cluster_shutdown, will return different EXIT code(EXIT_SYSFAIL or EXIT_FAILURE) to user according different error type. Does user care about this EXIT code? If not, I'm not against to change send_light_req(). > send_light_req() will make the code more simpler. -1 to indicate for > error case is enough for upper code. > > Thanks, > Yuan > > > > -- Yunkai Zhang Work at Taobao -- sheepdog mailing list sheepdog@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/sheepdog