aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Web/Tango.MachineService/Controllers/SynchronizationController.cs
diff options
context:
space:
mode:
authorRoy <roy.mail.net@gmail.com>2017-12-03 08:40:12 +0200
committerRoy <roy.mail.net@gmail.com>2017-12-03 08:40:12 +0200
commit7719e7647be76fb1f90968a04cf776952594dae6 (patch)
treed9ba29ff1f3f1ede0a87e2c9078a448fc31b78e2 /Software/Visual_Studio/Web/Tango.MachineService/Controllers/SynchronizationController.cs
parentc86984f6f012f10649d90b5d7c1786e12526b592 (diff)
downloadTango-7719e7647be76fb1f90968a04cf776952594dae6.tar.gz
Tango-7719e7647be76fb1f90968a04cf776952594dae6.zip
Working on remote sync.
Diffstat (limited to 'Software/Visual_Studio/Web/Tango.MachineService/Controllers/SynchronizationController.cs')
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService/Controllers/SynchronizationController.cs5
1 files changed, 4 insertions, 1 deletions
diff --git a/Software/Visual_Studio/Web/Tango.MachineService/Controllers/SynchronizationController.cs b/Software/Visual_Studio/Web/Tango.MachineService/Controllers/SynchronizationController.cs
index 8a4f94159..fd87815c9 100644
--- a/Software/Visual_Studio/Web/Tango.MachineService/Controllers/SynchronizationController.cs
+++ b/Software/Visual_Studio/Web/Tango.MachineService/Controllers/SynchronizationController.cs
@@ -27,6 +27,9 @@ namespace Tango.MachineService.Controllers
String slaveSQLiteFile = Path.Combine(tempFolder, "Local.db");
File.WriteAllBytes(slaveSQLiteFile, request.LocalDB.ToByteArray());
+
+
+
File.Copy(HostingEnvironment.MapPath(@"~/App_Data/Tango.db"), masterSQLiteFile);
RemoteDBSynchronizer.Synchronize(masterSQLiteFile, request.SerialNumber);
@@ -34,7 +37,7 @@ namespace Tango.MachineService.Controllers
LocalDBSynchronizer.Synchronize(masterSQLiteFile, slaveSQLiteFile);
SynchronizeDBResponse response = new SynchronizeDBResponse();
- response.ResponseDB = ByteString.CopyFrom(File.ReadAllBytes(slaveSQLiteFile));
+ response.RemoteDB = ByteString.CopyFrom(File.ReadAllBytes(slaveSQLiteFile));
PathHelper.TryDeleteFolder(tempFolder);