提交 eaddec97 编写于 作者: M Michal Privoznik

daemon: Move TLS initialization to virInitialize

My previous patch 74c75671
introduced a regression by removing TLS initialization from client.
上级 b1643dc1
...@@ -1516,7 +1516,6 @@ int main(int argc, char **argv) { ...@@ -1516,7 +1516,6 @@ int main(int argc, char **argv) {
virHookCall(VIR_HOOK_DRIVER_DAEMON, "-", VIR_HOOK_DAEMON_OP_START, virHookCall(VIR_HOOK_DRIVER_DAEMON, "-", VIR_HOOK_DAEMON_OP_START,
0, "start", NULL); 0, "start", NULL);
virNetTLSInit();
if (daemonSetupNetworking(srv, config, if (daemonSetupNetworking(srv, config,
sock_file, sock_file_ro, sock_file, sock_file_ro,
ipsock, privileged) < 0) { ipsock, privileged) < 0) {
...@@ -1555,7 +1554,6 @@ cleanup: ...@@ -1555,7 +1554,6 @@ cleanup:
virNetServerProgramFree(qemuProgram); virNetServerProgramFree(qemuProgram);
virNetServerClose(srv); virNetServerClose(srv);
virNetServerFree(srv); virNetServerFree(srv);
virNetTLSDeinit();
if (statuswrite != -1) { if (statuswrite != -1) {
if (ret != 0) { if (ret != 0) {
/* Tell parent of daemon what failed */ /* Tell parent of daemon what failed */
......
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
#include "memory.h" #include "memory.h"
#include "configmake.h" #include "configmake.h"
#include "intprops.h" #include "intprops.h"
#include "rpc/virnettlscontext.h"
#ifndef WITH_DRIVER_MODULES #ifndef WITH_DRIVER_MODULES
# ifdef WITH_TEST # ifdef WITH_TEST
...@@ -413,6 +414,8 @@ virInitialize(void) ...@@ -413,6 +414,8 @@ virInitialize(void)
virLogSetFromEnv(); virLogSetFromEnv();
virNetTLSInit();
VIR_DEBUG("register drivers"); VIR_DEBUG("register drivers");
#if HAVE_WINSOCK2_H #if HAVE_WINSOCK2_H
......
...@@ -1410,11 +1410,3 @@ void virNetTLSInit(void) ...@@ -1410,11 +1410,3 @@ void virNetTLSInit(void)
{ {
gnutls_global_init(); gnutls_global_init();
} }
/*
* See virNetTLSInit
*/
void virNetTLSDeinit(void)
{
gnutls_global_deinit();
}
...@@ -31,7 +31,6 @@ typedef virNetTLSSession *virNetTLSSessionPtr; ...@@ -31,7 +31,6 @@ typedef virNetTLSSession *virNetTLSSessionPtr;
void virNetTLSInit(void); void virNetTLSInit(void);
void virNetTLSDeinit(void);
virNetTLSContextPtr virNetTLSContextNewServerPath(const char *pkipath, virNetTLSContextPtr virNetTLSContextNewServerPath(const char *pkipath,
bool tryUserPkiPath, bool tryUserPkiPath,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册