Merge lp:~mandel/ubuntuone-windows-installer/fix_null_pointer_start into lp:ubuntuone-windows-installer/beta

Proposed by Manuel de la Peña
Status: Merged
Approved by: Vincenzo Di Somma
Approved revision: 15
Merged at revision: 39
Proposed branch: lp:~mandel/ubuntuone-windows-installer/fix_null_pointer_start
Merge into: lp:ubuntuone-windows-installer/beta
Diff against target: 37 lines (+7/-5)
1 file modified
src/Canonical.UbuntuOne.ProcessDispatcher/SyncDaemonWindowsService.cs (+7/-5)
To merge this branch: bzr merge lp:~mandel/ubuntuone-windows-installer/fix_null_pointer_start
Reviewer Review Type Date Requested Status
Vincenzo Di Somma (community) Approve
Stuart Colville (community) Approve
Review via email: mp+30666@code.launchpad.net

Description of the change

There as a bug in which we were not using the property to get the logger and therefore there was null pointer exception. The wch host has been disable until it is used.

To post a comment you must log in.
Revision history for this message
Stuart Colville (muffinresearch) wrote :

Installed service and starts and stops fine from adminstrative tools -> services when user is changed to local system account.

+1

review: Approve
Revision history for this message
Vincenzo Di Somma (vds) wrote :

Same, as above, plus tested removing the service and it works.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Canonical.UbuntuOne.ProcessDispatcher/SyncDaemonWindowsService.cs'
2--- src/Canonical.UbuntuOne.ProcessDispatcher/SyncDaemonWindowsService.cs 2010-07-07 10:41:49 +0000
3+++ src/Canonical.UbuntuOne.ProcessDispatcher/SyncDaemonWindowsService.cs 2010-07-22 14:58:43 +0000
4@@ -78,7 +78,7 @@
5 {
6 if (_host != null)
7 {
8- _logger.WarnFormat("{0} was already running!", MyServiceName);
9+ Logger.WarnFormat("{0} was already running!", MyServiceName);
10 _host.Close();
11 }
12
13@@ -88,8 +88,9 @@
14
15 // Open the ServiceHostBase to create listeners and start
16 // listening for messages.
17- _host.Open();
18- _logger.DebugFormat("{0} started.", MyServiceName);
19+ // TODO: Open again when config is done
20+ //_host.Open();
21+ Logger.DebugFormat("{0} started.", MyServiceName);
22 }
23
24 /// <summary>
25@@ -98,9 +99,10 @@
26 protected override void OnStop()
27 {
28 if (_host == null) return;
29- _host.Close();
30+ // TODO: Open again when config is done
31+ //_host.Close();
32 _host = null;
33- _logger.DebugFormat("{0} stopped", MyServiceName);
34+ Logger.DebugFormat("{0} stopped", MyServiceName);
35 }
36 }
37 }

Subscribers

People subscribed via source and target branches

to all changes: