summaryrefslogtreecommitdiffstats
path: root/src/Common/Request
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2008-09-07 23:42:04 +0200
committerMatthias Schiffer <matthias@gamezock.de>2008-09-07 23:42:04 +0200
commit406510059972fdbfb14bc8985980f52c655d5946 (patch)
treea71d11a0347d39d60c33103eb7ff608b547ff123 /src/Common/Request
parentce10864739759813d7376e447fae96abef23598d (diff)
downloadmad-406510059972fdbfb14bc8985980f52c655d5946.tar
mad-406510059972fdbfb14bc8985980f52c655d5946.zip
Einige Requests und Pakettypen umbenannt
Diffstat (limited to 'src/Common/Request')
-rw-r--r--src/Common/Request/GSSAPIAuthRequest.h (renamed from src/Common/Request/CertificateRequest.h)22
-rw-r--r--src/Common/Request/IdentifyRequest.h4
-rw-r--r--src/Common/Request/Makefile.am2
-rw-r--r--src/Common/Request/Makefile.in2
4 files changed, 15 insertions, 15 deletions
diff --git a/src/Common/Request/CertificateRequest.h b/src/Common/Request/GSSAPIAuthRequest.h
index 4e26041..51ab0f8 100644
--- a/src/Common/Request/CertificateRequest.h
+++ b/src/Common/Request/GSSAPIAuthRequest.h
@@ -1,5 +1,5 @@
/*
- * CertificateRequest.h
+ * GSSAPIAuthRequest.h
*
* Copyright (C) 2008 Matthias Schiffer <matthias@gamezock.de>
*
@@ -17,8 +17,8 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef MAD_COMMON_REQUEST_CERTIFICATEREQUEST_H_
-#define MAD_COMMON_REQUEST_CERTIFICATEREQUEST_H_
+#ifndef MAD_COMMON_REQUEST_GSSAPIAUTHREQUEST_H_
+#define MAD_COMMON_REQUEST_GSSAPIAUTHREQUEST_H_
#include "Request.h"
#include "../RequestManager.h"
@@ -37,7 +37,7 @@ namespace Request {
// TODO Logging & error handling!
-class CertificateRequest : public Request {
+class GSSAPIAuthRequest : public Request {
private:
std::string serviceName;
gss_name_t gssServiceName;
@@ -45,10 +45,10 @@ class CertificateRequest : public Request {
bool gssContinue;
- CertificateRequest(const std::string &serviceName0) : serviceName(serviceName0), gssServiceName(GSS_C_NO_NAME), gssContext(GSS_C_NO_CONTEXT), gssContinue(true) {}
+ GSSAPIAuthRequest(const std::string &serviceName0) : serviceName(serviceName0), gssServiceName(GSS_C_NO_NAME), gssContext(GSS_C_NO_CONTEXT), gssContinue(true) {}
public:
- virtual ~CertificateRequest() {
+ virtual ~GSSAPIAuthRequest() {
OM_uint32 minStat;
if(gssServiceName != GSS_C_NO_NAME)
@@ -56,7 +56,7 @@ class CertificateRequest : public Request {
}
static bool send(Net::Connection *connection, RequestManager &requestManager, const std::string &serviceName0) {
- CertificateRequest *request = new CertificateRequest(serviceName0);
+ GSSAPIAuthRequest *request = new GSSAPIAuthRequest(serviceName0);
if(requestManager.sendRequest(connection, request))
return true;
@@ -97,7 +97,7 @@ class CertificateRequest : public Request {
return false;
}
- if(!connection->send(Net::Packet(Net::Packet::TYPE_CERT_REQ, requestId, buffer.value, buffer.length))) {
+ if(!connection->send(Net::Packet(Net::Packet::TYPE_GSSAPI_AUTH, requestId, buffer.value, buffer.length))) {
gss_release_buffer(&minStat, &buffer);
return false;
}
@@ -112,7 +112,7 @@ class CertificateRequest : public Request {
if(isFinished())
return false;
- if(packet.getType() != Net::Packet::TYPE_CERT_REP)
+ if(packet.getType() != Net::Packet::TYPE_GSSAPI_AUTH)
return false; // TODO Logging
OM_uint32 majStat, minStat;
@@ -137,7 +137,7 @@ class CertificateRequest : public Request {
return false;
}
- if(!connection->send(Net::Packet(Net::Packet::TYPE_CERT_REQ, packet.getRequestId(), sendBuffer.value, sendBuffer.length))) {
+ if(!connection->send(Net::Packet(Net::Packet::TYPE_GSSAPI_AUTH, packet.getRequestId(), sendBuffer.value, sendBuffer.length))) {
gss_release_buffer(&minStat, &sendBuffer);
return false;
}
@@ -160,4 +160,4 @@ class CertificateRequest : public Request {
}
-#endif /* MAD_COMMON_REQUEST_CERTIFICATEREQUEST_H_ */
+#endif /* MAD_COMMON_REQUEST_GSSAPIAUTHREQUEST_H_ */
diff --git a/src/Common/Request/IdentifyRequest.h b/src/Common/Request/IdentifyRequest.h
index bb98bad..e88ce4b 100644
--- a/src/Common/Request/IdentifyRequest.h
+++ b/src/Common/Request/IdentifyRequest.h
@@ -53,7 +53,7 @@ class IdentifyRequest: public Request {
if(isSent())
return false;
- if(!connection->send(Net::Packet(Net::Packet::TYPE_IDENTIFY_REQ, requestId, hostname.c_str(), hostname.length())))
+ if(!connection->send(Net::Packet(Net::Packet::TYPE_IDENTIFY, requestId, hostname.c_str(), hostname.length())))
return false;
setSent();
@@ -64,7 +64,7 @@ class IdentifyRequest: public Request {
if(isFinished())
return false;
- if(packet.getType() != Net::Packet::TYPE_IDENTIFY_REP)
+ if(packet.getType() != Net::Packet::TYPE_IDENTIFY)
return false; // TODO Logging
std::cout << "Identified as '" << hostname << "'." << std::endl;
diff --git a/src/Common/Request/Makefile.am b/src/Common/Request/Makefile.am
index 6d54206..64c5078 100644
--- a/src/Common/Request/Makefile.am
+++ b/src/Common/Request/Makefile.am
@@ -1 +1 @@
-noinst_HEADERS = CertificateRequest.h DisconnectRequest.h IdentifyRequest.h Request.h
+noinst_HEADERS = DisconnectRequest.h GSSAPIAuthRequest.h IdentifyRequest.h Request.h
diff --git a/src/Common/Request/Makefile.in b/src/Common/Request/Makefile.in
index 0b1006d..bf7652c 100644
--- a/src/Common/Request/Makefile.in
+++ b/src/Common/Request/Makefile.in
@@ -162,7 +162,7 @@ sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-noinst_HEADERS = CertificateRequest.h DisconnectRequest.h IdentifyRequest.h Request.h
+noinst_HEADERS = DisconnectRequest.h GSSAPIAuthRequest.h IdentifyRequest.h Request.h
all: all-am
.SUFFIXES: