[Box Backup-commit] COMMIT r3405 - box/trunk/lib/server

subversion at boxbackup.org subversion at boxbackup.org
Thu Sep 18 21:28:35 BST 2014


Author: chris
Date: 2014-09-18 21:28:35 +0100 (Thu, 18 Sep 2014)
New Revision: 3405

Modified:
   box/trunk/lib/server/makeprotocol.pl.in
Log:
Add check for trying to ReceiveStream when no stream available

Modified: box/trunk/lib/server/makeprotocol.pl.in
===================================================================
--- box/trunk/lib/server/makeprotocol.pl.in	2014-09-18 20:28:31 UTC (rev 3404)
+++ box/trunk/lib/server/makeprotocol.pl.in	2014-09-18 20:28:35 UTC (rev 3405)
@@ -887,6 +887,13 @@
 public:
 	virtual std::auto_ptr<IOStream> ReceiveStream()
 	{
+		if(mStreamsToSend.empty())
+		{
+			THROW_EXCEPTION_MESSAGE(CommonException, Internal,
+				"Tried to ReceiveStream when none was sent or "
+				"made available");
+		}
+
 		std::auto_ptr<IOStream> apStream(mStreamsToSend.front());
 		mStreamsToSend.pop_front();
 		return apStream;




More information about the Boxbackup-commit mailing list