Fix for windows crash at start (after install for example)

git-svn-id: file:///svn/unbound/trunk@1713 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2009-07-13 07:45:19 +00:00
parent fa842c30de
commit 82f83d8d06
2 changed files with 13 additions and 1 deletions

View File

@ -1,3 +1,6 @@
13 July 2009: Wouter
- Fix for crash at start on windows.
9 July 2009: Wouter
- tag for release 1.3.1.
- trunk has version 1.3.2.

View File

@ -48,6 +48,7 @@
#include "winrc/w_inst.h"
#include "daemon/daemon.h"
#include "daemon/worker.h"
#include "daemon/remote.h"
#include "util/config_file.h"
#include "util/netevent.h"
#include "util/winsock_event.h"
@ -283,7 +284,15 @@ service_init(int r, struct daemon** d, struct config_file** c)
if(!r) report_status(SERVICE_START_PENDING, NO_ERROR, 2400);
verbose(VERB_QUERY, "winservice - apply cfg");
daemon_apply_cfg(daemon, cfg);
if(!r) report_status(SERVICE_START_PENDING, NO_ERROR, 2300);
if(!(daemon->rc = daemon_remote_create(cfg))) {
log_err("could not set up remote-control");
daemon_delete(daemon);
config_delete(cfg);
return 0;
}
/* open ports */
/* keep reporting that we are busy starting */
if(!r) report_status(SERVICE_START_PENDING, NO_ERROR, 2200);