X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=binapi%2Fgre%2Fgre_rpc.ba.go;h=11edd632d56b9ee7c2e42169acd46607ae4bea3e;hb=385ccc0d8ba929f39881efb7784bfb0921044ae8;hp=f664fb30ac445b79f45c6ae2f110adc8ce1d779a;hpb=d1f24d37bd447b64e402298bb8eb2479681facf9;p=govpp.git diff --git a/binapi/gre/gre_rpc.ba.go b/binapi/gre/gre_rpc.ba.go index f664fb3..11edd63 100644 --- a/binapi/gre/gre_rpc.ba.go +++ b/binapi/gre/gre_rpc.ba.go @@ -5,12 +5,13 @@ package gre import ( "context" "fmt" + "io" + api "git.fd.io/govpp.git/api" vpe "git.fd.io/govpp.git/binapi/vpe" - "io" ) -// RPCService defines RPC service gre. +// RPCService defines RPC service gre. type RPCService interface { GreTunnelAddDel(ctx context.Context, in *GreTunnelAddDel) (*GreTunnelAddDelReply, error) GreTunnelDump(ctx context.Context, in *GreTunnelDump) (RPCService_GreTunnelDumpClient, error) @@ -30,7 +31,7 @@ func (c *serviceClient) GreTunnelAddDel(ctx context.Context, in *GreTunnelAddDel if err != nil { return nil, err } - return out, nil + return out, api.RetvalToVPPApiError(out.Retval) } func (c *serviceClient) GreTunnelDump(ctx context.Context, in *GreTunnelDump) (RPCService_GreTunnelDumpClient, error) { @@ -66,6 +67,10 @@ func (c *serviceClient_GreTunnelDumpClient) Recv() (*GreTunnelDetails, error) { case *GreTunnelDetails: return m, nil case *vpe.ControlPingReply: + err = c.Stream.Close() + if err != nil { + return nil, err + } return nil, io.EOF default: return nil, fmt.Errorf("unexpected message: %T %v", m, m)