Skip to content

Commit

Permalink
Partially reverting commit bd5769f
Browse files Browse the repository at this point in the history
DTO needs to always be sent on relaunch, to keep track on what was actually done
  • Loading branch information
synhershko committed Jul 25, 2012
1 parent 9eaac75 commit 2bad19e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/NAppUpdate.Framework/UpdateManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ public void ApplyUpdates(bool relaunchApplication, bool updaterDoLogging, bool u
bool createdNew;
using (new Mutex(true, Config.UpdateProcessName + "Mutex", out createdNew))
{
if (NauIpc.LaunchProcessAndSendDto(dto, info, Config.UpdateProcessName, true) == null)
if (NauIpc.LaunchProcessAndSendDto(dto, info, Config.UpdateProcessName) == null)
throw new UpdateProcessFailedException("Could not launch cold update process");

Environment.Exit(0);
Expand Down
3 changes: 1 addition & 2 deletions src/NAppUpdate.Framework/Utils/NauIpc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ internal static string GetPipeName(string syncProcessName)

internal static uint BUFFER_SIZE = 4096;

public static Process LaunchProcessAndSendDto(NauDto dto, ProcessStartInfo processStartInfo, string syncProcessName, bool sendDto)
public static Process LaunchProcessAndSendDto(NauDto dto, ProcessStartInfo processStartInfo, string syncProcessName)
{
Process p;
using (var clientPipeHandle = CreateNamedPipe(
Expand All @@ -96,7 +96,6 @@ public static Process LaunchProcessAndSendDto(NauDto dto, ProcessStartInfo proce
return null;
}

if (sendDto)
while (true)
{
var success = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/NAppUpdate.Tests/Core/UpdateStarterTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public void UpdaterDeploymentAndIPCWorks()
Arguments = string.Format(@"""{0}"" -showConsole", dto.Configs.UpdateProcessName),
};

var p = NauIpc.LaunchProcessAndSendDto(dto, info, dto.Configs.UpdateProcessName, false);
var p = NauIpc.LaunchProcessAndSendDto(dto, info, dto.Configs.UpdateProcessName);
Assert.IsNotNull(p);
p.WaitForExit();

Expand Down
2 changes: 1 addition & 1 deletion src/NAppUpdate.Updater/AppStart.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ private static void Main()
FileName = appPath,
};

var p = NauIpc.LaunchProcessAndSendDto(dto, info, syncProcessName, false);
var p = NauIpc.LaunchProcessAndSendDto(dto, info, syncProcessName);
if (p == null)
throw new UpdateProcessFailedException("Unable to relaunch application");
}
Expand Down

0 comments on commit 2bad19e

Please sign in to comment.