summaryrefslogtreecommitdiff
path: root/src/messenger/messenger_api_message.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/messenger/messenger_api_message.c')
-rw-r--r--src/messenger/messenger_api_message.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/messenger/messenger_api_message.c b/src/messenger/messenger_api_message.c
index 496c98dbf..3814def70 100644
--- a/src/messenger/messenger_api_message.c
+++ b/src/messenger/messenger_api_message.c
@@ -219,6 +219,10 @@ get_message_body_kind_size (enum GNUNET_MESSENGER_MessageKind kind)
case GNUNET_MESSENGER_KIND_PRIVATE:
length += member_size(struct GNUNET_MESSENGER_Message, body.privacy.key);
break;
+ case GNUNET_MESSENGER_KIND_DELETE:
+ length += member_size(struct GNUNET_MESSENGER_Message, body.deletion.hash);
+ length += member_size(struct GNUNET_MESSENGER_Message, body.deletion.delay);
+ break;
default:
break;
}
@@ -445,6 +449,10 @@ encode_message_body (enum GNUNET_MESSENGER_MessageKind kind,
encode_step(buffer, offset, &(body->privacy.key));
encode_step_ext(buffer, offset, body->privacy.data, min(length - offset, body->privacy.length));
break;
+ case GNUNET_MESSENGER_KIND_DELETE:
+ encode_step(buffer, offset, &(body->deletion.hash));
+ encode_step(buffer, offset, &(body->deletion.delay));
+ break;
default:
break;
}
@@ -616,6 +624,10 @@ decode_message_body (enum GNUNET_MESSENGER_MessageKind *kind,
body->privacy.length = (length - offset);
decode_step_malloc(buffer, offset, body->privacy.data, length - offset, 0);
break;
+ case GNUNET_MESSENGER_KIND_DELETE:
+ decode_step(buffer, offset, &(body->deletion.hash));
+ decode_step(buffer, offset, &(body->deletion.delay));
+ break;
default:
*kind = GNUNET_MESSENGER_KIND_UNKNOWN;
break;