[sheepdog] [PATCH] collie: cleanup cluster subcommand callbacks when they send empty request

Liu Yuan namei.unix at gmail.com
Thu Jul 26 11:52:11 CEST 2012


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.

Thanks,
Yuan



More information about the sheepdog mailing list