I got the error message:
../usr/examples/xmpl-rpc/rpc_rpc.c: In function ‘send_myrpc’:
../usr/examples/xmpl-rpc/rpc_rpc.c:40:25: error: invalid type argument of ‘->’ (have ‘struct xmplrpc_binding’)
err = xmplrpc_client->rpc_tx_vtbl.myrpc(&xmplrpc_client, in, &s_out);
^
and the definition of xmplrpc_client
is:
static struct xmplrpc_binding xmplrpc_client;
The struct xmplrpc_binding
has
struct xmplrpc_rpc_tx_vtbl rpc_tx_vtbl;
And the struct xmplrpc_rpc_tx_vtbl
is
struct xmplrpc_rpc_tx_vtbl {
xmplrpc_myrpc__rpc_tx_method_fn *myrpc;
};
It's obvious that xmplrpc_client.rpc_tx_vtbl.myrpc
is the wrong way, and I think the way I wrote xmplrpc_client->rpc_tx_vtbl.myrpc
is correct.
What should I do to fix this error?