call_ready (p11_rpc_message *msg)
{
	assert (msg->output);

	/*
	 * Called right before invoking the actual PKCS#11 function
	 * Reading out of data is complete, get ready to write return values.
	 */

	if (p11_buffer_failed (msg->output)) {
		p11_message ("invalid request from module, probably too short"); \
		return PARSE_ERROR;
	}

	assert (p11_rpc_message_is_verified (msg));

	/* All done parsing input */
	msg->input = NULL;

	if (!p11_rpc_message_prep (msg, msg->call_id, P11_RPC_RESPONSE)) {
		p11_message ("couldn't initialize rpc response");
		return CKR_DEVICE_MEMORY;
	}

	return CKR_OK;
}
call_ready (p11_rpc_message *msg)
{
	assert (msg->output);

	 

	if (p11_buffer_failed (msg->output)) {
		p11_message ("invalid request from module, probably too short"); \
		return PARSE_ERROR;
	}

	assert (p11_rpc_message_is_verified (msg));

	 
	msg->input = NULL;

	if (!p11_rpc_message_prep (msg, msg->call_id, P11_RPC_RESPONSE)) {
		p11_message ("couldn't initialize rpc response");
		return CKR_DEVICE_MEMORY;
	}

	return CKR_OK;
}