summaryrefslogtreecommitdiff
path: root/plainPacket.cpp
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2008-02-04 20:34:37 +0000
committerChristian Pointner <equinox@anytun.org>2008-02-04 20:34:37 +0000
commitc01ff56f61b28d0a909f46b95182b5a26aaa6cd3 (patch)
tree0192e862cc9e71d260d64daf1f6fd2e4a379e80f /plainPacket.cpp
parentsorry for not working checkin ;) (diff)
fixed bug @ sync
key gets updatet @ sync
Diffstat (limited to 'plainPacket.cpp')
-rw-r--r--plainPacket.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/plainPacket.cpp b/plainPacket.cpp
index 7baef0b..50b8280 100644
--- a/plainPacket.cpp
+++ b/plainPacket.cpp
@@ -46,6 +46,7 @@ PlainPacket::~PlainPacket()
PlainPacket::PlainPacket(u_int32_t max_payload_length) : Buffer(max_payload_length + sizeof(payload_type_t))
{
+ payload_type_ = NULL;
splitPayload();
}
@@ -73,7 +74,8 @@ payload_type_t PlainPacket::getPayloadType() const
void PlainPacket::setPayloadType(payload_type_t payload_type)
{
- *payload_type_ = PAYLOAD_TYPE_T_HTON(payload_type);
+ if(payload_type_)
+ *payload_type_ = PAYLOAD_TYPE_T_HTON(payload_type);
}
void PlainPacket::setLength(u_int32_t length)