summaryrefslogtreecommitdiffhomepage
path: root/midiplay.cpp
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2025-01-12 17:57:49 +0100
committerRoland Reichwein <mail@reichwein.it>2025-01-12 17:57:49 +0100
commit6ba60f7329811a4bb3a07b1e6d81156d7f3a4ac3 (patch)
treeef35f8a046e8d679f4baef3c14a421e52eae9e15 /midiplay.cpp
parent208a484ca309a4919f83a385f402272039817ed9 (diff)
Added MIDIPlayer (WIP)
Diffstat (limited to 'midiplay.cpp')
-rw-r--r--midiplay.cpp7
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);