{
struct rpc_fail_reply header;
- fprintf(stderr, "Sending RPC failure status %d\n", stat);
-
header.xid = htonl(req->xid);
header.type = htonl(1); /* REPLY */
header.stat = htonl(MSG_ACCEPTED);
header.accept_stat = 0;
gsize msg_size = str->len;
- printf("Have an RPC reply of size %zd bytes\n", msg_size);
uint32_t fragment = htonl((msg_size + sizeof(header)) | 0x80000000);
async_rpc_write(req->connection, (const char *)&fragment, sizeof(fragment));
async_rpc_write(req->connection, (const char *)&header, sizeof(header));
xdrproc_t _xdr_argument, _xdr_result;
char *(*local)(char *, RPCRequest *);
+ printf("Dispatched NFS RPC message type %d\n", req->req_proc);
+
switch (req->req_proc) {
case NFSPROC3_NULL:
_xdr_argument = (xdrproc_t) xdr_void;
result = (*local)((char *)req->args, req);
bluesky_flushd_invoke(fs);
+ bluesky_debug_dump(fs);
return;
}
if (buf - msg->str > msg->len)
return FALSE;
- printf("Dispatching RPC procedure %d...\n", proc);
-
req->raw_args = msg;
req->raw_args_header_bytes = buf - msg->str;
req->req_proc = ntohl(header->proc);
rpc->frag_len = ntohl(rpc->frag_len);
g_string_set_size(rpc->msgbuf, rpc->msgbuf->len - 4);
rpc->frag_hdr_bytes = 0;
- g_print("RPC fragment header: %08x\n", rpc->frag_len);
}
} else {
/* We were reading in the fragment body. */
if (rpc->frag_len = 0x80000000) {
/* We have a complete message since this was the last fragment and
* there are no more bytes in it. Dispatch the message. */
- g_print("Complete RPC message: %zd bytes\n", rpc->msgbuf->len);
if (!async_rpc_dispatch(rpc)) {
fprintf(stderr, "Invalid RPC message, closing channel\n");
g_io_channel_shutdown(rpc->channel, TRUE, NULL);