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

subversion at boxbackup.org subversion at boxbackup.org
Fri Apr 18 23:25:42 BST 2014


Author: chris
Date: 2014-04-18 23:25:41 +0100 (Fri, 18 Apr 2014)
New Revision: 3342

Modified:
   box/trunk/lib/server/makeprotocol.pl.in
Log:
Add debugging code for when SendStream() fails during client command.

Will hopefully help to debug Brendon Baumgartner's issue with backups not
completing and repeating over and over, due to this error:

> Apr 18 11:14:09 hosting bbackupd[18990]: WARNING: Exception thrown:
> ServerException(Protocol_BadUsage) (Sending a stream with a definite
> size of zero is not allowed in the protocol) at Protocol.cpp:703

Modified: box/trunk/lib/server/makeprotocol.pl.in
===================================================================
--- box/trunk/lib/server/makeprotocol.pl.in	2014-04-18 09:28:14 UTC (rev 3341)
+++ box/trunk/lib/server/makeprotocol.pl.in	2014-04-18 22:25:41 UTC (rev 3342)
@@ -1105,8 +1105,6 @@
 				my $has_stream = obj_is_type($cmd,'StreamWithCommand');
 				my $argextra = $has_stream?', std::auto_ptr<IOStream> apDataStream':'';
 				my $send_stream_extra = '';
-				my $send_stream_method = $writing_client ? "SendStream"
-					: "SendStreamAfterCommand";
 
 				print CPP <<__E;
 std::auto_ptr<$reply_class> $server_or_client_class\::Query(const $request_class &rQuery$argextra)
@@ -1119,7 +1117,15 @@
 					{
 						$send_stream_extra = <<__E;
 	// Send stream after the command
-	SendStream(*apDataStream);
+	try
+	{
+		SendStream(*apDataStream);
+	}
+	catch (BoxException &e)
+	{
+		BOX_WARNING("Failed to send stream after command: " <<
+			rQuery.ToString() << ": " << e.what());
+	}
 __E
 					}
 					




More information about the Boxbackup-commit mailing list