[Box Backup-commit] COMMIT r2286 - box/trunk/lib/win32

boxbackup-dev@fluffy.co.uk boxbackup-dev@fluffy.co.uk
Sun, 14 Sep 2008 01:29:32 +0100 (BST)


Author: chris
Date: 2008-09-14 01:29:32 +0100 (Sun, 14 Sep 2008)
New Revision: 2286

Modified:
   box/trunk/lib/win32/emu.cpp
Log:
Compile fix for [2285].


Modified: box/trunk/lib/win32/emu.cpp
===================================================================
--- box/trunk/lib/win32/emu.cpp	2008-09-14 00:26:13 UTC (rev 2285)
+++ box/trunk/lib/win32/emu.cpp	2008-09-14 00:29:32 UTC (rev 2286)
@@ -1417,9 +1417,14 @@
 	{
 	}
 
-	std::string name = "Box Backup (" + daemonName + ")";
-	BOOL success = AddEventSource(name.c_str(), 0);
+	std::string nameStr = "Box Backup (";
+	nameStr += daemonName;
+	nameStr += ")";
 
+	char* name = strdup(nameStr.c_str());
+	BOOL success = AddEventSource(name, 0);
+	free(name);
+
 	if (!success)
 	{
 		::syslog(LOG_ERR, "Failed to add our own event source");