diff options
Diffstat (limited to 'src/Common/Requests')
-rw-r--r-- | src/Common/Requests/DisconnectRequest.cpp | 4 | ||||
-rw-r--r-- | src/Common/Requests/GSSAPIAuthRequest.cpp | 17 |
2 files changed, 6 insertions, 15 deletions
diff --git a/src/Common/Requests/DisconnectRequest.cpp b/src/Common/Requests/DisconnectRequest.cpp index 248f8b1..3fac25b 100644 --- a/src/Common/Requests/DisconnectRequest.cpp +++ b/src/Common/Requests/DisconnectRequest.cpp @@ -32,11 +32,11 @@ void DisconnectRequest::sendRequest() { void DisconnectRequest::handlePacket(const XmlPacket &packet) { if(packet.getType() == "Error") { - finishWithError(Common::Exception(packet["Where"], packet["ErrorCode"], packet["SubCode"], packet["SubSubCode"])); + finishWithError(Net::Exception(packet["Where"], packet["ErrorCode"], packet["SubCode"], packet["SubSubCode"])); return; } else if(packet.getType() != "OK") { - finishWithError(Exception(Exception::UNEXPECTED_PACKET)); + finishWithError(Net::Exception(Net::Exception::UNEXPECTED_PACKET)); return; // TODO Logging } diff --git a/src/Common/Requests/GSSAPIAuthRequest.cpp b/src/Common/Requests/GSSAPIAuthRequest.cpp index f10bf9b..ffc7939 100644 --- a/src/Common/Requests/GSSAPIAuthRequest.cpp +++ b/src/Common/Requests/GSSAPIAuthRequest.cpp @@ -68,17 +68,14 @@ void GSSAPIAuthRequest::sendRequest() { ret.setType("AuthGSSAPI"); ret.addBinary("authToken", buffer.value, buffer.length); - if(!sendPacket(ret)) { - gss_release_buffer(&minStat, &buffer); - return; - } + sendPacket(ret); gss_release_buffer(&minStat, &buffer); } void GSSAPIAuthRequest::handlePacket(const XmlPacket &packet) { if(packet.getType() != "AuthGSSAPI") { - finishWithError(Exception(Exception::UNEXPECTED_PACKET)); + finishWithError(Net::Exception(Net::Exception::UNEXPECTED_PACKET)); return; // TODO Logging } @@ -112,10 +109,7 @@ void GSSAPIAuthRequest::handlePacket(const XmlPacket &packet) { ret.setType("AuthGSSAPI"); ret.addBinary("authToken", sendBuffer.value, sendBuffer.length); - if(!sendPacket(ret)) { - gss_release_buffer(&minStat, &sendBuffer); - return; - } + sendPacket(ret); gss_release_buffer(&minStat, &sendBuffer); } @@ -153,10 +147,7 @@ void GSSAPIAuthRequest::handlePacket(const XmlPacket &packet) { ret.setType("AuthGSSAPI"); ret.addBinary("authToken", sendBuffer.value, sendBuffer.length); - if(!sendPacket(ret)) { - gss_release_buffer(&minStat, &sendBuffer); - return; - } + sendPacket(ret); gss_release_buffer(&minStat, &sendBuffer); |