[sheepdog] [PATCH] collie: cleanup cluster subcommand callbacks when they send empty request
Yunkai Zhang
yunkai.me at gmail.com
Thu Jul 26 11:56:11 CEST 2012
On Thu, Jul 26, 2012 at 5:52 PM, Liu Yuan <namei.unix at gmail.com> wrote:
> On 07/26/2012 05:31 PM, Yunkai Zhang wrote:
>> Cluster subcommand callbacks, such as: cluster_shutdown/cluster_cleanup/...,
>> share almost the same code, all of them send empty request which only
>> contains request-header without body content.
>>
>> So let's abstract the common part of the them into a new function:
>> send_empty_req() which could make code more compactness.
>
> There are more places, notably collie/node.c (and possibly other files)
> send header only requests too.
>
> I think send_light_req() would be a better name and send_light_req()
> should be placed in lib/net.c then all files can make use of it.
Ok, I'll give V2 later.
>
> Thanks,
> Yuan
--
Yunkai Zhang
Work at Taobao
More information about the sheepdog
mailing list