Changeset 628 for trollforge
- Timestamp:
- 01/19/12 02:20:29 (16 months ago)
- File:
-
- 1 edited
-
trollforge/lastmeasure/server/lmutil.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trollforge/lastmeasure/server/lmutil.h
r627 r628 84 84 md5((unsigned char*)hosthash,8,(unsigned char*)hash); 85 85 86 sprintf(buffer, "% 08lx", (0xffffffff - t));86 sprintf(buffer, "%lx", (0xffffffff - t)); 87 87 strcat(buffer,hash); 88 88 … … 91 91 92 92 /* Get back the date value from a key */ 93 static std::string KeyToDate(char const $key)93 static std::string KeyToDate(char const *key) 94 94 { 95 std::stringstream ret(""); 96 // return 0xffffffff - hexdec(substr($key, 0, 8)); 97 return ret.str(); 95 char buffer[8]; 96 char prekey[8]; 97 98 strncpy(prekey,key,8); 99 int hexkey = atoi(prekey); 100 sprintf(buffer, "%c", 0xffffffff - hexkey); 101 102 return buffer; 98 103 } 99 104
Note: See TracChangeset
for help on using the changeset viewer.
