summaryrefslogtreecommitdiffhomepage
path: root/mullvad-daemon/src
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2018-06-01 15:40:35 +0200
committerAndrej Mihajlov <and.mikhaylov@gmail.com>2018-06-04 14:52:04 +0200
commit7318786327ef2d9f14e5814a12bcf43da40feca0 (patch)
treedb3d7ac9376b2805f0102aff9cecf9a9baafb182 /mullvad-daemon/src
parent05405300140d1c20e2a843378a334953ddb1c5bb (diff)
downloadmullvadvpn-7318786327ef2d9f14e5814a12bcf43da40feca0.tar.xz
mullvadvpn-7318786327ef2d9f14e5814a12bcf43da40feca0.zip
Remove local source of windows-service and migrate to mullvad/windows-service-rs
Diffstat (limited to 'mullvad-daemon/src')
-rw-r--r--mullvad-daemon/src/system_service.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/mullvad-daemon/src/system_service.rs b/mullvad-daemon/src/system_service.rs
index 0cc53f3522..91e245e881 100644
--- a/mullvad-daemon/src/system_service.rs
+++ b/mullvad-daemon/src/system_service.rs
@@ -31,7 +31,7 @@ pub fn run() -> Result<()> {
// Start the service dispatcher.
// This will block current thread until the service stopped and spawn `service_main` on a
// background thread.
- service_dispatcher::start_dispatcher(SERVICE_NAME, service_main)
+ service_dispatcher::start(SERVICE_NAME, service_main)
.chain_err(|| "Failed to start a service dispatcher")
}
@@ -64,9 +64,8 @@ fn run_service(_arguments: Vec<OsString>) -> Result<()> {
_ => ServiceControlHandlerResult::NotImplemented,
}
};
- let status_handle =
- service_control_handler::register_control_handler(SERVICE_NAME, event_handler)
- .chain_err(|| "Failed to register a service control handler")?;
+ let status_handle = service_control_handler::register(SERVICE_NAME, event_handler)
+ .chain_err(|| "Failed to register a service control handler")?;
let mut persistent_service_status = PersistentServiceStatus::new(status_handle);
persistent_service_status
.set_pending_start(Duration::from_secs(1))