[CRIU] Re: [PATCH 2/6] protobuf: Convert inet sockets to PB engine

Pavel Emelyanov xemul at parallels.com
Mon Jul 16 23:50:01 EDT 2012


On 07/13/2012 09:05 PM, Cyrill Gorcunov wrote:
> 
> Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> ---
>  include/image.h        |   17 --------
>  include/sk-inet.h      |    5 ++-
>  protobuf/Makefile      |    1 +
>  protobuf/sk-inet.proto |   21 +++++++++
>  sk-inet.c              |  107 +++++++++++++++++++++++++++++++----------------
>  5 files changed, 96 insertions(+), 55 deletions(-)
>  create mode 100644 protobuf/sk-inet.proto
> 

> +	soe.n_so_snd_tmo = 2;
> +	soe.n_so_rcv_tmo = 2;
> +
> +	soe.so_snd_tmo = xzalloc(pb_repeated_size(&soe, so_snd_tmo));
> +	soe.so_rcv_tmo = xzalloc(pb_repeated_size(&soe, so_rcv_tmo));
> +
> +	if (!soe.so_snd_tmo || !soe.so_rcv_tmo)
> +		goto err;

All this should be hidden in pd_dump_socket_opts


More information about the CRIU mailing list