Commit 4ca904d0317eaf3ed537c3e39f9134c7299c75cd
1 parent
9a5fe40b
Use of GXml to send and receive messages through GVOHub
Showing
1 changed file
with
5 additions
and
5 deletions
src/vo/GVOHub.cpp
| ... | ... | @@ -423,28 +423,28 @@ std::string GVOHub::get_hub_lockfile(void) const |
| 423 | 423 | void GVOHub::handle_request(const socklen_t& sock) |
| 424 | 424 | { |
| 425 | 425 | // Initialize buffer |
| 426 | - char buffer[256]; | |
| 427 | - bzero(buffer,256); | |
| 426 | + char buffer[1024]; | |
| 427 | + bzero(buffer,1024); | |
| 428 | 428 | |
| 429 | 429 | // Declare empty XML document |
| 430 | 430 | GXml xml; |
| 431 | 431 | |
| 432 | 432 | // Read buffer |
| 433 | - int n = read(sock,buffer,255); | |
| 433 | + int n = read(sock,buffer,1024); | |
| 434 | 434 | if (n < 0) { |
| 435 | 435 | std::string msg = "Could not read socket buffer."; |
| 436 | 436 | throw GException::invalid_value(G_HANDLE_REQUEST, msg); |
| 437 | 437 | } |
| 438 | 438 | printf("Here is the message: %s\n",buffer); |
| 439 | 439 | std::string response = buffer; |
| 440 | - | |
| 440 | + | |
| 441 | 441 | // Find start of XML text |
| 442 | 442 | size_t start = response.find("<?xml"); |
| 443 | 443 | // If found then convert text into XML document |
| 444 | 444 | if (start != std::string::npos) { |
| 445 | 445 | xml = GXml(response.substr(start, std::string::npos)); |
| 446 | 446 | } |
| 447 | - | |
| 447 | + | |
| 448 | 448 | std::string method_called = ""; |
| 449 | 449 | // Search for value of methodName |
| 450 | 450 | const GXmlNode* node = xml.element("methodCall", 0); | ... | ... |