summaryrefslogtreecommitdiff
path: root/protocols/ICQ-WIM/src/server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/ICQ-WIM/src/server.cpp')
-rw-r--r--protocols/ICQ-WIM/src/server.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/protocols/ICQ-WIM/src/server.cpp b/protocols/ICQ-WIM/src/server.cpp
index 1135542926..2e31427eab 100644
--- a/protocols/ICQ-WIM/src/server.cpp
+++ b/protocols/ICQ-WIM/src/server.cpp
@@ -1062,15 +1062,10 @@ void CIcqProto::ShutdownSession()
void CIcqProto::StartSession()
{
- ptrA szDeviceId(getStringA("DeviceId"));
- if (szDeviceId == nullptr) {
- UUID deviceId;
- UuidCreate(&deviceId);
- RPC_CSTR szId;
- UuidToStringA(&deviceId, &szId);
- szDeviceId = mir_strdup((char*)szId);
+ CMStringA szDeviceId(getMStringA("DeviceId"));
+ if (szDeviceId.IsEmpty()) {
+ szDeviceId = Utils_GenerateUUID();
setString("DeviceId", szDeviceId);
- RpcStringFreeA(&szId);
}
int ts = TS();