mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
event-test: Force compiler check in switch for connectClose callback
This commit is contained in:
parent
fa95523b24
commit
09ddd86027
@ -23,24 +23,27 @@ connectClose(virConnectPtr conn ATTRIBUTE_UNUSED,
|
|||||||
int reason,
|
int reason,
|
||||||
void *opaque ATTRIBUTE_UNUSED)
|
void *opaque ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
switch (reason) {
|
run = 0;
|
||||||
|
|
||||||
|
switch ((virConnectCloseReason) reason) {
|
||||||
case VIR_CONNECT_CLOSE_REASON_ERROR:
|
case VIR_CONNECT_CLOSE_REASON_ERROR:
|
||||||
fprintf(stderr, "Connection closed due to I/O error\n");
|
fprintf(stderr, "Connection closed due to I/O error\n");
|
||||||
break;
|
return;
|
||||||
|
|
||||||
case VIR_CONNECT_CLOSE_REASON_EOF:
|
case VIR_CONNECT_CLOSE_REASON_EOF:
|
||||||
fprintf(stderr, "Connection closed due to end of file\n");
|
fprintf(stderr, "Connection closed due to end of file\n");
|
||||||
break;
|
return;
|
||||||
|
|
||||||
case VIR_CONNECT_CLOSE_REASON_KEEPALIVE:
|
case VIR_CONNECT_CLOSE_REASON_KEEPALIVE:
|
||||||
fprintf(stderr, "Connection closed due to keepalive timeout\n");
|
fprintf(stderr, "Connection closed due to keepalive timeout\n");
|
||||||
break;
|
return;
|
||||||
|
|
||||||
case VIR_CONNECT_CLOSE_REASON_CLIENT:
|
case VIR_CONNECT_CLOSE_REASON_CLIENT:
|
||||||
fprintf(stderr, "Connection closed due to client request\n");
|
fprintf(stderr, "Connection closed due to client request\n");
|
||||||
break;
|
return;
|
||||||
default:
|
|
||||||
fprintf(stderr, "Connection closed due to unknown reason\n");
|
|
||||||
break;
|
|
||||||
};
|
};
|
||||||
run = 0;
|
|
||||||
|
fprintf(stderr, "Connection closed due to unknown reason\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user