- fix issue where getMeetings and getRecordings calls just loops back resulting in StakOverflow

This commit is contained in:
Richard Alam 2014-04-02 16:17:24 +00:00
parent 1a9857d493
commit 090cb4115b
2 changed files with 34 additions and 24 deletions

View File

@ -41,6 +41,14 @@ class UrlMappings {
action = [POST:'setPollXML']
}
"/api/getMeetings"(controller:"api") {
action = [GET:'getMeetingsHandler']
}
"/api/getRecordings"(controller:"api") {
action = [GET:'getRecordingsHandler']
}
"/$controller/$action?/$id?(.${format})?"{
constraints {
// apply constraints here

View File

@ -678,10 +678,12 @@ class ApiController {
/************************************
* GETMEETINGS API
************************************/
def getMeetings = {
def getMeetingsHandler = {
String API_CALL = "getMeetings"
log.debug CONTROLLER_NAME + "#${API_CALL}"
println("##### GETMEETINGS API CALL ####")
// BEGIN - backward compatibility
if (StringUtils.isEmpty(params.checksum)) {
invalid("checksumError", "You did not pass the checksum security check")
@ -722,25 +724,24 @@ class ApiController {
render(contentType:"text/xml") {
response() {
returncode(RESP_CODE_SUCCESS)
meetings(null)
meetings()
messageKey("noMeetings")
message("no meetings were found on this server")
}
}
}
}
return;
}
} else {
println("#### Has running meetings [" + mtgs.size() + "] #####")
response.addHeader("Cache-Control", "no-cache")
withFormat {
xml {
render(contentType:"text/xml") {
response() {
returncode(RESP_CODE_SUCCESS)
meetings() {
mtgs.each { m ->
meeting() {
meetings {
for (m in mtgs) {
meeting {
meetingID(m.getExternalId())
meetingName(m.getName())
createTime(m.getCreateTime())
@ -756,6 +757,7 @@ class ApiController {
}
}
}
}
def getDefaultConfigXML = {
@ -1415,7 +1417,7 @@ class ApiController {
/******************************************************
* GET_RECORDINGS API
******************************************************/
def getRecordings = {
def getRecordingsHandler = {
String API_CALL = "getRecordings"
log.debug CONTROLLER_NAME + "#${API_CALL}"