diff options
author | joe | 2011-04-21 17:22:52 +0200 |
---|---|---|
committer | joe | 2011-04-21 17:22:52 +0200 |
commit | c95ab785a56ab739576b1fee9c4bc989dad09775 (patch) | |
tree | a949abb59f956a1b4b2172bcd837fb91970974a8 /src | |
parent | fbgui class doxigen comments (to test...) (diff) | |
download | fbgui-c95ab785a56ab739576b1fee9c4bc989dad09775.tar.gz fbgui-c95ab785a56ab739576b1fee9c4bc989dad09775.tar.xz fbgui-c95ab785a56ab739576b1fee9c4bc989dad09775.zip |
mainboard serial formatting if empty
Diffstat (limited to 'src')
-rw-r--r-- | src/fbgui.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/fbgui.cpp b/src/fbgui.cpp index fd6f5fa..760a490 100644 --- a/src/fbgui.cpp +++ b/src/fbgui.cpp @@ -245,7 +245,12 @@ QByteArray fbgui::generatePOSTData() { SysInfo si; QByteArray data(si.getInfo("mac").toUtf8()); // append mainboard serial to the mac address for more unique hardwarehash - data.append(si.getInfo("mbserial").toUtf8()); + QByteArray mbserial(si.getInfo("mbserial").toUtf8()); + if (!mbserial.isEmpty()) + data.append(mbserial); + else { + qxtLog->debug() << "[gui] Mainboard serial was empty. Not appending..."; + } qxtLog->debug() << "[post] Hashing: " << data; // generate MD5 hash of data QByteArray hash = QCryptographicHash::hash(data, QCryptographicHash::Md5); |