- fix issue where getMeetings and getRecordings calls just loops back resulting in StakOverflow
This commit is contained in:
parent
1a9857d493
commit
090cb4115b
@ -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
|
||||
|
@ -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")
|
||||
@ -708,7 +710,7 @@ class ApiController {
|
||||
|
||||
// Do we agree on the checksum? If not, complain.
|
||||
if (! paramsProcessorUtil.isChecksumSame(API_CALL, params.checksum, request.getQueryString())) {
|
||||
errors.checksumError()
|
||||
errors.checksumError()
|
||||
respondWithErrors(errors)
|
||||
return
|
||||
}
|
||||
@ -722,37 +724,37 @@ 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;
|
||||
}
|
||||
|
||||
response.addHeader("Cache-Control", "no-cache")
|
||||
withFormat {
|
||||
xml {
|
||||
render(contentType:"text/xml") {
|
||||
response() {
|
||||
returncode(RESP_CODE_SUCCESS)
|
||||
meetings() {
|
||||
mtgs.each { m ->
|
||||
meeting() {
|
||||
meetingID(m.getExternalId())
|
||||
meetingName(m.getName())
|
||||
createTime(m.getCreateTime())
|
||||
attendeePW(m.getViewerPassword())
|
||||
moderatorPW(m.getModeratorPassword())
|
||||
hasBeenForciblyEnded(m.isForciblyEnded() ? "true" : "false")
|
||||
running(m.isRunning() ? "true" : "false")
|
||||
} 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 {
|
||||
for (m in mtgs) {
|
||||
meeting {
|
||||
meetingID(m.getExternalId())
|
||||
meetingName(m.getName())
|
||||
createTime(m.getCreateTime())
|
||||
attendeePW(m.getViewerPassword())
|
||||
moderatorPW(m.getModeratorPassword())
|
||||
hasBeenForciblyEnded(m.isForciblyEnded() ? "true" : "false")
|
||||
running(m.isRunning() ? "true" : "false")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1415,7 +1417,7 @@ class ApiController {
|
||||
/******************************************************
|
||||
* GET_RECORDINGS API
|
||||
******************************************************/
|
||||
def getRecordings = {
|
||||
def getRecordingsHandler = {
|
||||
String API_CALL = "getRecordings"
|
||||
log.debug CONTROLLER_NAME + "#${API_CALL}"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user