Commit 6820724f4e1f4ddd158c000e37b36f06bd0e491e

Authored by Thierry Louge
1 parent c6191011

GVOHub and GVOCLient bugs vs. SAMP standard fixed

src/vo/GVOClient.cpp
@@ -399,8 +399,9 @@ void GVOClient::publish(const GFitsHDU& hdu) @@ -399,8 +399,9 @@ void GVOClient::publish(const GFitsHDU& hdu)
399 hub_command.append("<methodCall>\n"); 399 hub_command.append("<methodCall>\n");
400 hub_command.append(" <methodName>samp.hub.notifyAll</methodName>\n"); 400 hub_command.append(" <methodName>samp.hub.notifyAll</methodName>\n");
401 hub_command.append(" <params>\n"); 401 hub_command.append(" <params>\n");
402 - hub_command.append(" <param><value>image.load.fits</value></param>\n");  
403 - hub_command.append(" <param><value>"+m_secret+"</value></param>\n"); 402 + //hub_command.append(" <param><value>image.load.fits</value></param>\n");
  403 + //hub_command.append(" <param><value>"+m_secret+"</value></param>\n");
  404 + hub_command.append(" <param><value>"+m_client_key+"</value></param>\n");
404 hub_command.append(" <param><value><struct>\n"); 405 hub_command.append(" <param><value><struct>\n");
405 hub_command.append(" <member><name>samp.params</name><value><struct>\n"); 406 hub_command.append(" <member><name>samp.params</name><value><struct>\n");
406 hub_command.append(" <member><name>name</name><value>"+extname+"</value></member>\n"); 407 hub_command.append(" <member><name>name</name><value>"+extname+"</value></member>\n");
src/vo/GVOHub.cpp
@@ -1125,7 +1125,7 @@ void GVOHub::request_notify_all(const GXml&amp; xml, const socklen_t&amp; sock) @@ -1125,7 +1125,7 @@ void GVOHub::request_notify_all(const GXml&amp; xml, const socklen_t&amp; sock)
1125 { 1125 {
1126 // Header 1126 // Header
1127 #if defined(G_CONSOLE_DUMP) 1127 #if defined(G_CONSOLE_DUMP)
1128 - std::cout << "GVOHub::request_notify_all" << std::endl; 1128 + std::cout << "GVOHub::request_notify_all entrance" << std::endl;
1129 #endif 1129 #endif
1130 1130
1131 // Get message type 1131 // Get message type
@@ -2077,8 +2077,8 @@ void GVOHub::notify_image_load(const GVOHub::client&amp; client, @@ -2077,8 +2077,8 @@ void GVOHub::notify_image_load(const GVOHub::client&amp; client,
2077 const GXml& xml) 2077 const GXml& xml)
2078 { 2078 {
2079 // Get client response 2079 // Get client response
2080 - const GXmlNode* node = xml.element("methodCall > params > param[2] > value > struct > member > value > struct");  
2081 - //const GXmlNode* node = xml.element("methodCall > params > param[1] > value > struct > member > value > struct"); 2080 + //const GXmlNode* node = xml.element("methodCall > params > param[2] > value > struct > member > value > struct");
  2081 + const GXmlNode* node = xml.element("methodCall > params > param[1] > value > struct > member > value > struct");
2082 // Extract image information from client response 2082 // Extract image information from client response
2083 std::string name = get_response_value(node, "name"); 2083 std::string name = get_response_value(node, "name");
2084 std::string url = get_response_value(node, "url"); 2084 std::string url = get_response_value(node, "url");
@@ -2221,23 +2221,18 @@ std::string GVOHub::get_mtype(const GXml&amp; xml) const @@ -2221,23 +2221,18 @@ std::string GVOHub::get_mtype(const GXml&amp; xml) const
2221 { 2221 {
2222 // Header 2222 // Header
2223 #if defined(G_CONSOLE_DUMP) 2223 #if defined(G_CONSOLE_DUMP)
2224 - std::cout << "GVOHub::get_mtype entrance" << std::endl; 2224 + std::cout << "In GVOHub::get_mtype" << std::endl;
2225 #endif 2225 #endif
2226 2226
2227 // Initialise response 2227 // Initialise response
2228 std::string client_key = ""; 2228 std::string client_key = "";
2229 2229
2230 // Get the client's private key 2230 // Get the client's private key
2231 - /*  
2232 - #if defined(G_CONSOLE_DUMP)  
2233 - std::cout << "GVOHub::get_mtype identifying node" << std::endl;  
2234 - #endif 2231 +
2235 const GXmlNode* node = xml.element("methodCall > params > param[1] > value > struct "); 2232 const GXmlNode* node = xml.element("methodCall > params > param[1] > value > struct ");
2236 - #if defined(G_CONSOLE_DUMP)  
2237 - std::cout << "GVOHub::get_mtype calling get response value" << std::endl;  
2238 - #endif  
2239 - client_key = get_response_value(node, "name");  
2240 - /**/ 2233 +
  2234 + client_key = get_response_value(node, "samp.mtype");
  2235 + /*
2241 const GXmlNode* node = xml.element("methodCall > params > param > value"); 2236 const GXmlNode* node = xml.element("methodCall > params > param > value");
2242 if (node != NULL) { 2237 if (node != NULL) {
2243 const GXmlText* text = static_cast<const GXmlText*>((*node)[0]); 2238 const GXmlText* text = static_cast<const GXmlText*>((*node)[0]);
@@ -2245,7 +2240,7 @@ std::string GVOHub::get_mtype(const GXml&amp; xml) const @@ -2245,7 +2240,7 @@ std::string GVOHub::get_mtype(const GXml&amp; xml) const
2245 client_key = text->text(); 2240 client_key = text->text();
2246 } 2241 }
2247 } 2242 }
2248 - /* */ 2243 + */
2249 // Return key 2244 // Return key
2250 return client_key; 2245 return client_key;
2251 } 2246 }