diff options
author | Roland Reichwein <mail@reichwein.it> | 2025-01-12 17:57:49 +0100 |
---|---|---|
committer | Roland Reichwein <mail@reichwein.it> | 2025-01-12 17:57:49 +0100 |
commit | 6ba60f7329811a4bb3a07b1e6d81156d7f3a4ac3 (patch) | |
tree | ef35f8a046e8d679f4baef3c14a421e52eae9e15 /midiplay.cpp | |
parent | 208a484ca309a4919f83a385f402272039817ed9 (diff) |
Added MIDIPlayer (WIP)
Diffstat (limited to 'midiplay.cpp')
-rw-r--r-- | midiplay.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/midiplay.cpp b/midiplay.cpp index 75f33da..d5c0ef0 100644 --- a/midiplay.cpp +++ b/midiplay.cpp @@ -1,3 +1,5 @@ +#include "MIDIPlayer.h" + #include <string> #include <fcgiapp.h> @@ -17,7 +19,7 @@ std::string getPostData(FCGX_Request& request) unsigned int status = FCGX_GetStr(result.data(), result.size(), request.in); if (status != result.size()) { - return fmt::format("Read error: {}/{}", status, result); + return fmt::format("Read error: {}/{}", status, result.size()); } return result; @@ -46,8 +48,9 @@ int main(int argc, char* argv[]) { FCGX_PutS("Content-Type: text/xml\r\n\r\n", request.out); std::string data = getPostData(request); - if (data == "<data><value1>3</value1></data>") + if (data == "<data><command>3</command></data>") { FCGX_PutS("<data><value1>4</value1></data>", request.out); + } } else { FCGX_PutS("Content-Type: text/text\r\n\r\n", request.out); FCGX_PutS("Bad request method: POST expected", request.out); |