# HG changeset patch # User mas01cr # Date 1234435494 0 # Node ID d5ada9532a401170ec05c35ff5ba5df9617d13a1 # Parent 0694bb74c5e9fcedcd3c9a8df5b065ef9ed5cd9a Implement error exits in the SOAP client when the return code is not SOAP_OK. Corresponding fixes in the test suite, while we're at it. diff -r 0694bb74c5e9 -r d5ada9532a40 soap.cpp --- a/soap.cpp Wed Feb 11 12:38:04 2009 +0000 +++ b/soap.cpp Thu Feb 12 10:44:54 2009 +0000 @@ -20,7 +20,9 @@ std::cout << "nullCount = " << adbStatusResponse.result.nullCount << std::endl; std::cout << "flags = " << (adbStatusResponse.result.flags & 0x00FFFFFF) << std::endl; } else { - soap_print_fault(&soap,stderr); + char fault[MAXSTR]; + soap_sprint_fault(&soap, fault, MAXSTR); + error(fault); } soap_destroy(&soap); @@ -39,8 +41,13 @@ << adbLisztResponse.result.Rlen[i] << ")" << std::endl; } } else { - soap_print_fault(&soap, stderr); + char fault[MAXSTR]; + soap_sprint_fault(&soap, fault, MAXSTR); + error(fault); } + soap_destroy(&soap); + soap_end(&soap); + soap_done(&soap); } // WS_QUERY (CLIENT SIDE) @@ -72,7 +79,9 @@ } } } else { - soap_print_fault(&soap,stderr); + char fault[MAXSTR]; + soap_sprint_fault(&soap, fault, MAXSTR); + error(fault); } soap_destroy(&soap); @@ -122,10 +131,12 @@ for(int i=0; i