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 399 hub_command.append("<methodCall>\n");
400 400 hub_command.append(" <methodName>samp.hub.notifyAll</methodName>\n");
401 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 405 hub_command.append(" <param><value><struct>\n");
405 406 hub_command.append(" <member><name>samp.params</name><value><struct>\n");
406 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 1125 {
1126 1126 // Header
1127 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 1129 #endif
1130 1130  
1131 1131 // Get message type
... ... @@ -2077,8 +2077,8 @@ void GVOHub::notify_image_load(const GVOHub::client&amp; client,
2077 2077 const GXml& xml)
2078 2078 {
2079 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 2082 // Extract image information from client response
2083 2083 std::string name = get_response_value(node, "name");
2084 2084 std::string url = get_response_value(node, "url");
... ... @@ -2221,23 +2221,18 @@ std::string GVOHub::get_mtype(const GXml&amp; xml) const
2221 2221 {
2222 2222 // Header
2223 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 2225 #endif
2226 2226  
2227 2227 // Initialise response
2228 2228 std::string client_key = "";
2229 2229  
2230 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 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 2236 const GXmlNode* node = xml.element("methodCall > params > param > value");
2242 2237 if (node != NULL) {
2243 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 2240 client_key = text->text();
2246 2241 }
2247 2242 }
2248   - /* */
  2243 + */
2249 2244 // Return key
2250 2245 return client_key;
2251 2246 }
... ...