]> git.sesse.net Git - casparcg/commitdiff
AMCP: Reply with error on amcp command overflow.
authorronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Tue, 27 Dec 2011 08:54:50 +0000 (08:54 +0000)
committerronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Tue, 27 Dec 2011 08:54:50 +0000 (08:54 +0000)
git-svn-id: https://casparcg.svn.sourceforge.net/svnroot/casparcg/server/trunk@1943 362d55ac-95cf-4e76-9f9a-cbaa9c17b72d

protocol/amcp/AMCPCommand.h
protocol/amcp/AMCPCommandQueue.cpp

index ad081fdacb21305729c74b4934f41b0735c69cf8..a1b691f5cbcb0510494c9991e84899a3d5eb9502 100644 (file)
@@ -80,9 +80,9 @@ namespace amcp {
                virtual std::wstring print() const = 0;\r
 \r
                void SetScheduling(AMCPCommandScheduling s){scheduling_ = s;}\r
+               void SetReplyString(const std::wstring& str){replyString_ = str;}\r
 \r
        protected:\r
-               void SetReplyString(const std::wstring& str){replyString_ = str;}\r
                std::vector<std::wstring> _parameters;\r
                std::vector<std::wstring> _parameters2;\r
 \r
index 8af0236e82fe786db00fd9cbb2e5a47675b5be6b..ec5cefd830e7270d088b47d20225c36a40ba0320 100644 (file)
@@ -46,6 +46,8 @@ void AMCPCommandQueue::AddCommand(AMCPCommandPtr pCurrentCommand)
        {\r
                CASPAR_LOG(error) << "AMCP Command Queue Overflow.";\r
                CASPAR_LOG(error) << "Failed to execute command:" << pCurrentCommand->print();\r
+               pCurrentCommand->SetReplyString(L"500 FAILED");\r
+               pCurrentCommand->SendReply();\r
        }\r
        \r
        executor_.begin_invoke([=]\r