fixed the C++ wrapper of the resetStorage method in the storage server
This commit is contained in:
parent
d2a971ad45
commit
575e1a56ab
2 changed files with 16 additions and 8 deletions
|
@ -22,7 +22,7 @@
|
|||
|
||||
|
||||
Author : $Author: fgerlits $
|
||||
Version : $Revision: 1.9 $
|
||||
Version : $Revision: 1.10 $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/authentication/src/WebAuthenticationClient.cxx,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -173,9 +173,14 @@ static const std::string preferencesStatusParamName = "status";
|
|||
static const std::string resetStorageMethodName = "locstor.resetStorage";
|
||||
|
||||
/*------------------------------------------------------------------------------
|
||||
* The name of the result parameter returned by the method (ignored here)
|
||||
* The name of the list of audio clips parameter returned (ignored here)
|
||||
*----------------------------------------------------------------------------*/
|
||||
static const std::string resetStorageResultParamName = "gunids";
|
||||
static const std::string resetStorageAudioClipResultParamName = "audioclips";
|
||||
|
||||
/*------------------------------------------------------------------------------
|
||||
* The name of the list of playlists parameter returned (ignored here)
|
||||
*----------------------------------------------------------------------------*/
|
||||
static const std::string resetStoragePlaylistResultParamName = "playlists";
|
||||
|
||||
|
||||
/* =============================================== local function prototypes */
|
||||
|
@ -552,15 +557,18 @@ WebAuthenticationClient :: reset(void)
|
|||
throw Core::XmlRpcMethodFaultException(eMsg.str());
|
||||
}
|
||||
|
||||
if (! result.hasMember(resetStorageResultParamName)
|
||||
|| result[resetStorageResultParamName].getType()
|
||||
if (! result.hasMember(resetStorageAudioClipResultParamName)
|
||||
|| result[resetStorageAudioClipResultParamName].getType()
|
||||
!= XmlRpcValue::TypeArray
|
||||
|| ! result.hasMember(resetStoragePlaylistResultParamName)
|
||||
|| result[resetStoragePlaylistResultParamName].getType()
|
||||
!= XmlRpcValue::TypeArray) {
|
||||
std::stringstream eMsg;
|
||||
eMsg << "XML-RPC method '"
|
||||
<< resetStorageMethodName
|
||||
<< "' returned unexpected value:\n"
|
||||
<< result;
|
||||
throw Core::XmlRpcMethodResponseException(eMsg.str());
|
||||
throw XmlRpcMethodResponseException(eMsg.str());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
|
||||
Author : $Author: fgerlits $
|
||||
Version : $Revision: 1.28 $
|
||||
Version : $Revision: 1.29 $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/src/WebStorageClient.cxx,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -1886,7 +1886,7 @@ WebStorageClient :: reset(void)
|
|||
for (int i=0; i < playlistArray.size(); i++) {
|
||||
if (playlistArray[i].getType() != XmlRpcValue::TypeString) {
|
||||
std::stringstream eMsg;
|
||||
eMsg << "Non-string audio clip gunid returned by XML-RPC method '"
|
||||
eMsg << "Non-string playlist gunid returned by XML-RPC method '"
|
||||
<< resetStorageMethodName
|
||||
<< "':\n"
|
||||
<< result;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue