From 86b6fb32391f5f351eb9d4e67050916e1d51c9b9 Mon Sep 17 00:00:00 2001 From: Ryan Pavlik Date: Mon, 11 Apr 2016 18:35:08 -0500 Subject: [PATCH] Secure a send guard lock before doing the guts of a device descriptor update. --- src/osvr/Connection/DeviceToken.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/osvr/Connection/DeviceToken.cpp b/src/osvr/Connection/DeviceToken.cpp index 16696b969..c518e1b71 100644 --- a/src/osvr/Connection/DeviceToken.cpp +++ b/src/osvr/Connection/DeviceToken.cpp @@ -116,6 +116,8 @@ bool OSVR_DeviceTokenObject::releaseObject(void *obj) { void OSVR_DeviceTokenObject::setDeviceDescriptor( std::string const &jsonString) { + auto guard = getSendGuard(); + guard->lock(); m_getConnectionDevice()->setDeviceDescriptor(jsonString); m_getConnection()->triggerDescriptorHandlers(); }