mirror of https://gitee.com/openkylin/libvirt.git
daemon: Move TLS initialization to virInitialize
My previous patch 74c7567133
introduced a regression by removing TLS initialization from client.
This commit is contained in:
parent
b1643dc15c
commit
eaddec976e
|
@ -1516,7 +1516,6 @@ int main(int argc, char **argv) {
|
|||
virHookCall(VIR_HOOK_DRIVER_DAEMON, "-", VIR_HOOK_DAEMON_OP_START,
|
||||
0, "start", NULL);
|
||||
|
||||
virNetTLSInit();
|
||||
if (daemonSetupNetworking(srv, config,
|
||||
sock_file, sock_file_ro,
|
||||
ipsock, privileged) < 0) {
|
||||
|
@ -1555,7 +1554,6 @@ cleanup:
|
|||
virNetServerProgramFree(qemuProgram);
|
||||
virNetServerClose(srv);
|
||||
virNetServerFree(srv);
|
||||
virNetTLSDeinit();
|
||||
if (statuswrite != -1) {
|
||||
if (ret != 0) {
|
||||
/* Tell parent of daemon what failed */
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
#include "memory.h"
|
||||
#include "configmake.h"
|
||||
#include "intprops.h"
|
||||
#include "rpc/virnettlscontext.h"
|
||||
|
||||
#ifndef WITH_DRIVER_MODULES
|
||||
# ifdef WITH_TEST
|
||||
|
@ -413,6 +414,8 @@ virInitialize(void)
|
|||
|
||||
virLogSetFromEnv();
|
||||
|
||||
virNetTLSInit();
|
||||
|
||||
VIR_DEBUG("register drivers");
|
||||
|
||||
#if HAVE_WINSOCK2_H
|
||||
|
|
|
@ -1410,11 +1410,3 @@ void virNetTLSInit(void)
|
|||
{
|
||||
gnutls_global_init();
|
||||
}
|
||||
|
||||
/*
|
||||
* See virNetTLSInit
|
||||
*/
|
||||
void virNetTLSDeinit(void)
|
||||
{
|
||||
gnutls_global_deinit();
|
||||
}
|
||||
|
|
|
@ -31,7 +31,6 @@ typedef virNetTLSSession *virNetTLSSessionPtr;
|
|||
|
||||
|
||||
void virNetTLSInit(void);
|
||||
void virNetTLSDeinit(void);
|
||||
|
||||
virNetTLSContextPtr virNetTLSContextNewServerPath(const char *pkipath,
|
||||
bool tryUserPkiPath,
|
||||
|
|
Loading…
Reference in New Issue