[Box Backup-commit] COMMIT r1397 - box/chris/merge/lib/win32

boxbackup-dev at fluffy.co.uk boxbackup-dev at fluffy.co.uk
Sat Mar 10 17:12:01 GMT 2007


Author: chris
Date: 2007-03-10 17:12:01 +0000 (Sat, 10 Mar 2007)
New Revision: 1397

Modified:
   box/chris/merge/lib/win32/emu.cpp
Log:
Our timer code only supports ITIMER_REAL (refs #3)


Modified: box/chris/merge/lib/win32/emu.cpp
===================================================================
--- box/chris/merge/lib/win32/emu.cpp	2007-03-10 17:06:13 UTC (rev 1396)
+++ box/chris/merge/lib/win32/emu.cpp	2007-03-10 17:12:01 UTC (rev 1397)
@@ -44,7 +44,14 @@
 {
 	ASSERT(gTimerInitialised);
 	
+	if (ITIMER_REAL != type)
+	{
+		errno = ENOSYS;
+		return -1;
+	}
+
 	EnterCriticalSection(&gLock);
+
 	// we only need seconds for the mo!
 	if (timeout->it_value.tv_sec  == 0 && 
 	    timeout->it_value.tv_usec == 0)
@@ -58,6 +65,7 @@
 		ourTimer.interval  = timeout->it_interval.tv_sec;
 		gTimerList.push_back(ourTimer);
 	}
+
 	LeaveCriticalSection(&gLock);
 	
 	// indicate success




More information about the Boxbackup-commit mailing list