1 From 60f546b6f4a54a399a0cd0cece84486b7018c477 Mon Sep 17 00:00:00 2001
2 From: Alasdair Campbell <alcoheca@gmail.com>
3 Date: Wed, 6 Jun 2012 17:04:31 +0100
4 Subject: [PATCH 03/24] platinum: log allowed values with state variable
8 lib/libUPnP/Platinum/Source/Core/PltStateVariable.cpp | 14 +++++++++-----
9 1 file changed, 9 insertions(+), 5 deletions(-)
11 diff --git a/lib/libUPnP/Platinum/Source/Core/PltStateVariable.cpp b/lib/libUPnP/Platinum/Source/Core/PltStateVariable.cpp
12 index a772bbf..c3eb7cc 100644
13 --- a/lib/libUPnP/Platinum/Source/Core/PltStateVariable.cpp
14 +++ b/lib/libUPnP/Platinum/Source/Core/PltStateVariable.cpp
15 @@ -198,12 +198,16 @@ PLT_StateVariable::ValidateValue(const char* value)
16 NPT_List<NPT_String>::Iterator val = values.GetFirstItem();
19 - if (!m_AllowedValues.Find(NPT_StringFinder(*val))) {
20 - NPT_LOG_WARNING_2("Invalid value of %s for state variable %s",
22 - (const char*)m_Name);
23 + if (!m_AllowedValues.Find(NPT_StringFinder(*val))) {
24 + NPT_LOG_WARNING_2("Invalid value of %s for state variable %s",
26 + (const char*)m_Name);
27 + for (unsigned long i=0; i < m_AllowedValues.GetItemCount(); i++) {
28 + NPT_String *val = *m_AllowedValues.GetItem(i);
29 + NPT_LOG_WARNING_1("Allowed: %s", (const char*)*val);
31 return NPT_ERROR_INVALID_PARAMETERS;