summaryrefslogtreecommitdiffstats
path: root/src/Common
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2008-09-12 21:43:42 +0200
committerMatthias Schiffer <matthias@gamezock.de>2008-09-12 21:43:42 +0200
commit3a3751f02a3efdc079c3f79987da59b234813f16 (patch)
tree12034654eeda706be576742d62a847c041d4ad56 /src/Common
parentc6f395af944d74967243f4b680d34fa6667df4a1 (diff)
downloadmad-3a3751f02a3efdc079c3f79987da59b234813f16.tar
mad-3a3751f02a3efdc079c3f79987da59b234813f16.zip
Schreibe Pakettypen ohne TYPE_
Diffstat (limited to 'src/Common')
-rw-r--r--src/Common/Request/CoreStatusRequest.h4
-rw-r--r--src/Common/Request/DisconnectRequest.h4
-rw-r--r--src/Common/Request/GSSAPIAuthRequest.h8
-rw-r--r--src/Common/Request/IdentifyRequest.h4
-rw-r--r--src/Common/RequestManager.cpp8
5 files changed, 14 insertions, 14 deletions
diff --git a/src/Common/Request/CoreStatusRequest.h b/src/Common/Request/CoreStatusRequest.h
index cd28cc2..fb16675 100644
--- a/src/Common/Request/CoreStatusRequest.h
+++ b/src/Common/Request/CoreStatusRequest.h
@@ -54,7 +54,7 @@ class CoreStatusRequest: public Request {
if(isSent())
return false;
- if(!connection->send(Net::Packet(Net::Packet::TYPE_CORE_STATUS, requestId)))
+ if(!connection->send(Net::Packet(Net::Packet::CORE_STATUS, requestId)))
return false;
setSent();
@@ -65,7 +65,7 @@ class CoreStatusRequest: public Request {
if(isFinished())
return false;
- if(packet.getType() != Net::Packet::TYPE_OK)
+ if(packet.getType() != Net::Packet::OK)
return false; // TODO Logging
finished(Net::Packets::CoreStatusPacket(packet));
diff --git a/src/Common/Request/DisconnectRequest.h b/src/Common/Request/DisconnectRequest.h
index 3f6e018..1b2d467 100644
--- a/src/Common/Request/DisconnectRequest.h
+++ b/src/Common/Request/DisconnectRequest.h
@@ -54,7 +54,7 @@ class DisconnectRequest: public Request {
if(isSent())
return false;
- if(!connection->send(Net::Packet(Net::Packet::TYPE_DISCONNECT, requestId)))
+ if(!connection->send(Net::Packet(Net::Packet::DISCONNECT, requestId)))
return false;
setSent();
@@ -65,7 +65,7 @@ class DisconnectRequest: public Request {
if(isFinished())
return false;
- if(packet.getType() != Net::Packet::TYPE_OK)
+ if(packet.getType() != Net::Packet::OK)
return false; // TODO Logging
connection->disconnect();
diff --git a/src/Common/Request/GSSAPIAuthRequest.h b/src/Common/Request/GSSAPIAuthRequest.h
index ff92755..6882f36 100644
--- a/src/Common/Request/GSSAPIAuthRequest.h
+++ b/src/Common/Request/GSSAPIAuthRequest.h
@@ -97,7 +97,7 @@ class GSSAPIAuthRequest : public Request {
return false;
}
- if(!connection->send(Net::Packet(Net::Packet::TYPE_GSSAPI_AUTH, requestId, buffer.value, buffer.length))) {
+ if(!connection->send(Net::Packet(Net::Packet::GSSAPI_AUTH, requestId, buffer.value, buffer.length))) {
gss_release_buffer(&minStat, &buffer);
return false;
}
@@ -112,7 +112,7 @@ class GSSAPIAuthRequest : public Request {
if(isFinished())
return false;
- if(packet.getType() != Net::Packet::TYPE_GSSAPI_AUTH)
+ if(packet.getType() != Net::Packet::GSSAPI_AUTH)
return false; // TODO Logging
OM_uint32 majStat, minStat;
@@ -137,7 +137,7 @@ class GSSAPIAuthRequest : public Request {
return false;
}
- if(!connection->send(Net::Packet(Net::Packet::TYPE_GSSAPI_AUTH, packet.getRequestId(), sendBuffer.value, sendBuffer.length))) {
+ if(!connection->send(Net::Packet(Net::Packet::GSSAPI_AUTH, packet.getRequestId(), sendBuffer.value, sendBuffer.length))) {
gss_release_buffer(&minStat, &sendBuffer);
return false;
}
@@ -171,7 +171,7 @@ class GSSAPIAuthRequest : public Request {
return false;
}
- if(!connection->send(Net::Packet(Net::Packet::TYPE_GSSAPI_AUTH, packet.getRequestId(), sendBuffer.value, sendBuffer.length))) {
+ if(!connection->send(Net::Packet(Net::Packet::GSSAPI_AUTH, packet.getRequestId(), sendBuffer.value, sendBuffer.length))) {
gss_release_buffer(&minStat, &sendBuffer);
return false;
}
diff --git a/src/Common/Request/IdentifyRequest.h b/src/Common/Request/IdentifyRequest.h
index dfb6ce6..e7b9d21 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, requestId, hostname.c_str(), hostname.length())))
+ if(!connection->send(Net::Packet(Net::Packet::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)
+ if(packet.getType() != Net::Packet::IDENTIFY)
return false; // TODO Logging
std::cout << "Identified as '" << hostname << "'." << std::endl;
diff --git a/src/Common/RequestManager.cpp b/src/Common/RequestManager.cpp
index c9761d2..f8d5450 100644
--- a/src/Common/RequestManager.cpp
+++ b/src/Common/RequestManager.cpp
@@ -62,14 +62,14 @@ void RequestManager::receiveHandler(Net::Connection *connection, const Net::Pack
switch(packet.getType()) {
- case Net::Packet::TYPE_DISCONNECT:
- connection->send(Net::Packet(Net::Packet::TYPE_OK, packet.getRequestId()));
+ case Net::Packet::DISCONNECT:
+ connection->send(Net::Packet(Net::Packet::OK, packet.getRequestId()));
connection->disconnect();
break;
- case Net::Packet::TYPE_IDENTIFY:
+ case Net::Packet::IDENTIFY:
std::cout << "Received identify request from '" << std::string((char*)packet.getData(), packet.getLength()) << "'." << std::endl;
- connection->send(Net::Packet(Net::Packet::TYPE_IDENTIFY, packet.getRequestId(), packet.getData(), packet.getLength()));
+ connection->send(Net::Packet(Net::Packet::IDENTIFY, packet.getRequestId(), packet.getData(), packet.getLength()));
break;
default:
std::cerr << "Received an unexpected packet." << std::endl;