From aaa2ea1a1d576dcad5397e4bc650a0efcdd860a4 Mon Sep 17 00:00:00 2001 From: thlo Date: Sun, 29 Sep 2013 16:11:03 +0200 Subject: Fix in /recording.xml --- responsememblk.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/responsememblk.c b/responsememblk.c index 273890a..5fe4118 100755 --- a/responsememblk.c +++ b/responsememblk.c @@ -2211,9 +2211,11 @@ int cResponseMemBlk::sendRecordingsXml(struct stat *statbuf) { } if (mRequest->getQueryAttributeValue(&avps, "guid", guid) == OKAY){ + guid = cUrlEncode::doUrlSaveDecode(guid); *(mLog->log())<< DEBUGPREFIX << " Found a guid Parameter: " << guid << endl; + single_item = true; } @@ -2312,8 +2314,12 @@ int cResponseMemBlk::sendRecordingsXml(struct stat *statbuf) { cRecording *recording = NULL; if (single_item) { recording = Recordings.GetByName(guid.c_str()); - if (recording == NULL) + if (recording == NULL) { *(mLog->log())<< DEBUGPREFIX << " WARNING in sendRecordingsXml: recording " << guid << " not found" << endl; + sendError(400, "Bad Request", NULL, "007 Failed to find the recording."); + return OKAY; + } + } else { recording = Recordings.First(); -- cgit v1.2.3