提交 6c84533f 编写于 作者: D Daniel P. Berrangé

rpc: handle missing switch enum cases

Ensure all enum cases are listed in switch statements.
Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
上级 7fef8e33
......@@ -1287,6 +1287,8 @@ virNetClientCallDispatch(virNetClientPtr client)
case VIR_NET_STREAM_HOLE: /* Sparse stream protocol*/
return virNetClientCallDispatchStream(client);
case VIR_NET_CALL:
case VIR_NET_CALL_WITH_FDS:
default:
virReportError(VIR_ERR_RPC,
_("got unexpected RPC call prog %d vers %d proc %d type %d"),
......
......@@ -384,6 +384,7 @@ int virNetClientProgramCall(virNetClientProgramPtr prog,
virNetClientProgramDispatchError(prog, msg);
goto error;
case VIR_NET_CONTINUE:
default:
virReportError(VIR_ERR_RPC,
_("Unexpected message status %d"), msg->header.status);
......
......@@ -324,6 +324,10 @@ int virNetServerProgramDispatch(virNetServerProgramPtr prog,
ret = 0;
break;
case VIR_NET_REPLY:
case VIR_NET_REPLY_WITH_FDS:
case VIR_NET_MESSAGE:
case VIR_NET_STREAM_HOLE:
default:
virReportError(VIR_ERR_RPC,
_("Unexpected message type %u"),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册