summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthlo <smarttv640@gmail.com>2013-08-18 15:58:45 +0200
committerthlo <smarttv640@gmail.com>2013-08-18 15:58:45 +0200
commit08f320d0a8c9ea3954f4db3636186db41c71496e (patch)
tree3ccde25923d63c0b0cf479f8d5eb64b83dc62b8c
parentad45f2d55557a83a1fb45ca70d35453fd83d3973 (diff)
downloadvdr-plugin-smarttvweb-08f320d0a8c9ea3954f4db3636186db41c71496e.tar.gz
vdr-plugin-smarttvweb-08f320d0a8c9ea3954f4db3636186db41c71496e.tar.bz2
Cleanups.
-rwxr-xr-xresponsememblk.c6
-rwxr-xr-xsmarttvfactory.c14
2 files changed, 9 insertions, 11 deletions
diff --git a/responsememblk.c b/responsememblk.c
index 64075bc..6f370e0 100755
--- a/responsememblk.c
+++ b/responsememblk.c
@@ -1163,7 +1163,7 @@ void cResponseMemBlk::sendRecCmds() {
mResponseMessagePos = 0;
mRequest->mConnState = SERVING;
- sendHeaders(200, "OK", NULL, "text/plain", mResponseMessage->size(), -1);
+ sendHeaders(200, "OK", NULL, "application/xml", mResponseMessage->size(), -1);
}
void cResponseMemBlk::receiveExecRecCmdReq() {
@@ -1182,7 +1182,7 @@ void cResponseMemBlk::receiveExecRecCmdReq() {
}
guid =cUrlEncode::doUrlSaveDecode(guid);
if (mRequest->getQueryAttributeValue(&avps, "cmd", cmd_str) != OKAY){
- sendError(400, "Bad Request", NULL, "00? Mandatory cmd attribute not present.");
+ sendError(400, "Bad Request", NULL, "015 Mandatory cmd attribute not present.");
return ;
}
cmdid = atoi(cmd_str.c_str());
@@ -1195,7 +1195,7 @@ void cResponseMemBlk::receiveExecRecCmdReq() {
if ((cmdid <0 ) || ( cmdid > r_cmds->size())) {
*(mLog->log())<< DEBUGPREFIX
<< " ERROR: cmd value out of range." << endl;
- sendError(400, "Bad Request", NULL, "00? cmd value out of range..");
+ sendError(400, "Bad Request", NULL, "016 Command (cmd) value out of range.");
return ;
}
*(mLog->log())<< DEBUGPREFIX
diff --git a/smarttvfactory.c b/smarttvfactory.c
index 15c1011..9986dc0 100755
--- a/smarttvfactory.c
+++ b/smarttvfactory.c
@@ -666,21 +666,16 @@ int SmartTvServer::isServing() {
string SmartTvServer::processNestedItemList(string pref, cList<cNestedItem> *cmd, vector<cCmd*> *cmd_list) {
char f[80];
-
string msg ="";
- // *(mLog.log()) << " pnil: cmd_list->size= " << cmd_list->size() << endl;
for (cNestedItem *c = cmd->First(); c; c = cmd->Next(c)) {
if (c->SubItems()) {
- // *(mLog.log()) << "Sub: " << c->Text() << endl;
cCmd *itm = new cCmd(c->Text());
-
+
msg += processNestedItemList( pref+itm->mTitle+"~", c->SubItems(), cmd_list);
delete itm;
}
else {
- // *(mLog.log()) << "c->Text= " << c->Text() << endl;
-
cCmd *itm = new cCmd(c->Text());
cmd_list->push_back(itm);
@@ -688,16 +683,18 @@ string SmartTvServer::processNestedItemList(string pref, cList<cNestedItem> *cmd
(pref + itm->mTitle).c_str());
msg += f;
}
- }
+ }
return msg;
}
+
void SmartTvServer::initRecCmds() {
- *(mLog.log()) << " Init rec cmds" << endl;
mRecMsg = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
mRecMsg += "<reccmds>\n";
mRecMsg += processNestedItemList("", &RecordingCommands, &mRecCmds);
mRecMsg += "</reccmds>\n";
// *(mLog.log()) << mRecMsg << endl;
+
+ /*
for (int i=0; i< mRecCmds.size(); i++){
*(mLog.log()) << i
<< " t= " << mRecCmds[i]->mTitle
@@ -706,6 +703,7 @@ void SmartTvServer::initRecCmds() {
}
*(mLog.log()) << " done" << endl;
+*/
}
void SmartTvServer::initServer(string dir) {