From dcbea31a35227f834f78cd2070c5f986bc1fce37 Mon Sep 17 00:00:00 2001 From: Sven Gestegard Robertz <sven.robertz@cs.lth.se> Date: Sat, 25 Oct 2014 16:11:30 +0200 Subject: [PATCH] put back more pragma stuff, c encoder working as before --- lib/c/labcomm_encoder.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/c/labcomm_encoder.c b/lib/c/labcomm_encoder.c index ff38dfe..f912505 100644 --- a/lib/c/labcomm_encoder.c +++ b/lib/c/labcomm_encoder.c @@ -216,7 +216,7 @@ free_encoder: #endif -int labcomm_internal_encoder_register( +static int labcomm_internal_encoder_reg_type( struct labcomm_encoder *e, struct labcomm_signature *signature, labcomm_encoder_function encode) @@ -257,6 +257,18 @@ out: return result; } +int labcomm_internal_encoder_register( + struct labcomm_encoder *e, + struct labcomm_signature *signature, + labcomm_encoder_function encode) +{ + if(e->context_type == LABCOMM_PRAGMA && e->context){ + e=((struct pragma_packet_builder *)e->context)->parent; + } + return labcomm_internal_encoder_reg_type( + e, signature, encode); +} + int labcomm_internal_encode( struct labcomm_encoder *e, struct labcomm_signature *signature, -- GitLab