aboutsummaryrefslogtreecommitdiffstats
path: root/samsung-ipc/ipc_util.c
diff options
context:
space:
mode:
Diffstat (limited to 'samsung-ipc/ipc_util.c')
-rw-r--r--samsung-ipc/ipc_util.c32
1 files changed, 28 insertions, 4 deletions
diff --git a/samsung-ipc/ipc_util.c b/samsung-ipc/ipc_util.c
index f8b7fe9..1af1fec 100644
--- a/samsung-ipc/ipc_util.c
+++ b/samsung-ipc/ipc_util.c
@@ -442,21 +442,21 @@ void ipc_client_log_send(struct ipc_client *client,
}
}
-void ipc_header_fill(struct ipc_header *header, struct ipc_message_info *message)
+void ipc_fmt_header_fill(struct ipc_fmt_header *header, struct ipc_message_info *message)
{
if (header == NULL || message == NULL)
return;
- memset(header, 0, sizeof(struct ipc_header));
+ memset(header, 0, sizeof(struct ipc_fmt_header));
header->mseq = message->mseq;
header->aseq = message->aseq;
header->group = message->group;
header->index = message->index;
header->type = message->type;
- header->length = message->length + sizeof(struct ipc_header);
+ header->length = message->length + sizeof(struct ipc_fmt_header);
}
-void ipc_message_info_fill(struct ipc_header *header, struct ipc_message_info *message)
+void ipc_fmt_message_fill(struct ipc_fmt_header *header, struct ipc_message_info *message)
{
if (header == NULL || message == NULL)
return;
@@ -472,4 +472,28 @@ void ipc_message_info_fill(struct ipc_header *header, struct ipc_message_info *m
message->data = NULL;
}
+void ipc_rfs_header_fill(struct ipc_rfs_header *header, struct ipc_message_info *message)
+{
+ if (header == NULL || message == NULL)
+ return;
+
+ memset(header, 0, sizeof(struct ipc_rfs_header));
+ header->id = message->mseq;
+ header->index = message->index;
+ header->length = message->length + sizeof(struct ipc_rfs_header);
+}
+
+void ipc_rfs_message_fill(struct ipc_rfs_header *header, struct ipc_message_info *message)
+{
+ if (header == NULL || message == NULL)
+ return;
+
+ memset(message, 0, sizeof(struct ipc_message_info));
+ message->aseq = header->id;
+ message->group = IPC_GROUP_RFS;
+ message->index = header->index;
+ message->length = 0;
+ message->data = NULL;
+}
+
// vim:ts=4:sw=4:expandtab