Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/22/11 14:35:12 (14 years ago)
Author:
ascheibe
Message:

#1233 don't save the unique machine id

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  
    2424using System.Diagnostics;
    2525using System.Management;
    26 using HeuristicLab.Clients.Hive.SlaveCore.Properties;
    2726
    2827
     
    122121
    123122    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;
    139132    }
    140133
     
    163156    ///  D1      D2  D3  Res.   D4
    164157    /// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    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|
    166159    /// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    167160    ///
    168161    /// The mac address is saved in the last 48 bits of the Data 4 segment
    169162    /// of the guid (first 2 bytes of Data 4 are reserved).
     163    /// D1 contains the name of the machine.
    170164    /// </summary>   
    171165    private static Guid GetUniqueMachineIdFromMac() {
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/WcfService.cs

    r5636 r5790  
    101101
    102102    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));
    104104    }
    105105    #endregion
Note: See TracChangeset for help on using the changeset viewer.