diff --git a/examples/domain-events/events-c/event-test.c b/examples/domain-events/events-c/event-test.c index af1f47d09ae0a1ea386b072a835a42267572e8ef..648e6eaef64524c89cdbc4e8bfdc8632f4c23c49 100644 --- a/examples/domain-events/events-c/event-test.c +++ b/examples/domain-events/events-c/event-test.c @@ -353,7 +353,9 @@ int main(int argc, char **argv) virEventRegisterDefaultImpl(); virConnectPtr dconn = NULL; - dconn = virConnectOpenReadOnly (argv[1] ? argv[1] : NULL); + dconn = virConnectOpenAuth(argc > 1 ? argv[1] : NULL, + virConnectAuthPtrDefault, + VIR_CONNECT_RO); if (!dconn) { printf("error opening\n"); return -1;