aboutsummaryrefslogtreecommitdiffstats
path: root/src/linux
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2018-05-24 13:07:43 -0400
committerKevin O'Connor <kevin@koconnor.net>2018-05-28 10:43:39 -0400
commitc8af3feee6b35e33ab989ca8af0b48d738d4aedf (patch)
tree1a50e691bfe80403f38b7cec5c45f8171c7e8ae5 /src/linux
parentcb4e165071ad56c4cf881f5221f02eeefde5de53 (diff)
downloadkutter-c8af3feee6b35e33ab989ca8af0b48d738d4aedf.tar.gz
kutter-c8af3feee6b35e33ab989ca8af0b48d738d4aedf.tar.xz
kutter-c8af3feee6b35e33ab989ca8af0b48d738d4aedf.zip
command: Add a command_encode_and_frame() helper
Add a helper function that calls command_encodef() followed by command_add_frame(). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/linux')
-rw-r--r--src/linux/console.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/linux/console.c b/src/linux/console.c
index a1086942..9064171f 100644
--- a/src/linux/console.c
+++ b/src/linux/console.c
@@ -176,8 +176,7 @@ console_sendf(const struct command_encoder *ce, va_list args)
{
// Generate message
uint8_t buf[MESSAGE_MAX];
- uint_fast8_t msglen = command_encodef(buf, ce, args);
- command_add_frame(buf, msglen);
+ uint_fast8_t msglen = command_encode_and_frame(buf, ce, args);
// Transmit message
int ret = write(main_pfd[MP_TTY_IDX].fd, buf, msglen);