DEREG_CB(priv->nodedevConn, priv->nodeDeviceEventCallbacks,
priv->nnodeDeviceEventCallbacks,
virConnectNodeDeviceEventDeregisterAny, "node device");
- DEREG_CB(priv->conn, priv->secretEventCallbacks,
+ DEREG_CB(priv->secretConn, priv->secretEventCallbacks,
priv->nsecretEventCallbacks,
virConnectSecretEventDeregisterAny, "secret");
DEREG_CB(priv->conn, priv->qemuEventCallbacks,
virConnectClose(priv->nodedevConn);
if (priv->nwfilterConn)
virConnectClose(priv->nwfilterConn);
+ if (priv->secretConn)
+ virConnectClose(priv->secretConn);
VIR_FREE(priv);
}
priv->networkConn = virObjectRef(priv->conn);
priv->nodedevConn = virObjectRef(priv->conn);
priv->nwfilterConn = virObjectRef(priv->conn);
+ priv->secretConn = virObjectRef(priv->conn);
/* force update the @readonly attribute which was inherited from the
* virNetServerService object - this is important for sockets that are RW
struct daemonClientPrivate *priv =
virNetServerClientGetPrivateData(client);
- if (!priv->conn) {
+ if (!priv->secretConn) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
goto cleanup;
}
- if (!(secret = get_nonnull_secret(priv->conn, args->secret)))
+ if (!(secret = get_nonnull_secret(priv->secretConn, args->secret)))
goto cleanup;
if (!(value = virSecretGetValue(secret, &value_size, args->flags)))
virNetServerClientGetPrivateData(client);
virSecretPtr secret = NULL;
- if (!priv->conn) {
+ if (!priv->secretConn) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
goto cleanup;
}
virMutexLock(&priv->lock);
if (args->secret &&
- !(secret = get_nonnull_secret(priv->conn, *args->secret)))
+ !(secret = get_nonnull_secret(priv->secretConn, *args->secret)))
goto cleanup;
if (args->eventID >= VIR_SECRET_EVENT_ID_LAST || args->eventID < 0) {
callback) < 0)
goto cleanup;
- if ((callbackID = virConnectSecretEventRegisterAny(priv->conn,
+ if ((callbackID = virConnectSecretEventRegisterAny(priv->secretConn,
secret,
args->eventID,
secretEventCallbacks[args->eventID],
struct daemonClientPrivate *priv =
virNetServerClientGetPrivateData(client);
- if (!priv->conn) {
+ if (!priv->secretConn) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
goto cleanup;
}
goto cleanup;
}
- if (virConnectSecretEventDeregisterAny(priv->conn, args->callbackID) < 0)
+ if (virConnectSecretEventDeregisterAny(priv->secretConn, args->callbackID) < 0)
goto cleanup;
VIR_DELETE_ELEMENT(priv->secretEventCallbacks, i,