Changeset 5790 for branches/HeuristicLab.Hive-3.4/sources
- Timestamp:
- 03/22/11 14:35:12 (14 years ago)
- Location:
- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/ConfigManager.cs
r5789 r5790 24 24 using System.Diagnostics; 25 25 using System.Management; 26 using HeuristicLab.Clients.Hive.SlaveCore.Properties;27 26 28 27 … … 122 121 123 122 public static Guid GetUniqueMachineId() { 124 if (Settings.Default.Guid == Guid.Empty) { 125 Guid id; 126 try { 127 id = GetUniqueMachineIdFromMac(); 128 } 129 catch { 130 // fallback if something goes wrong... 131 id = Guid.NewGuid(); 132 } 133 134 Settings.Default.Guid = id; 135 Settings.Default.Save(); 136 return id; 137 } else 138 return Settings.Default.Guid; 123 Guid id; 124 try { 125 id = GetUniqueMachineIdFromMac(); 126 } 127 catch { 128 // fallback if something goes wrong... 129 id = new Guid(Environment.MachineName.GetHashCode(), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); 130 } 131 return id; 139 132 } 140 133 … … 163 156 /// D1 D2 D3 Res. D4 164 157 /// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 165 /// | 0 0 0 0|0 0|0 0|0 0 mac address|158 /// |n a m e|0 0|0 0|0 0 mac address| 166 159 /// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 167 160 /// 168 161 /// The mac address is saved in the last 48 bits of the Data 4 segment 169 162 /// of the guid (first 2 bytes of Data 4 are reserved). 163 /// D1 contains the name of the machine. 170 164 /// </summary> 171 165 private static Guid GetUniqueMachineIdFromMac() { -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/WcfService.cs
r5636 r5790 101 101 102 102 public Job UpdateJobState(Guid jobId, JobState jobState, string exception) { 103 return CallHiveService(s => s.UpdateJobState(jobId, jobState, ConfigManager. GetUniqueMachineId(), null, exception));103 return CallHiveService(s => s.UpdateJobState(jobId, jobState, ConfigManager.Instance.GetClientInfo().Id, null, exception)); 104 104 } 105 105 #endregion
Note: See TracChangeset
for help on using the changeset viewer.