From 1d01446e29dd131c7e86d2aa4d67bf1e2f595954 Mon Sep 17 00:00:00 2001
From: Sven Gestegard Robertz <sven.robertz@cs.lth.se>
Date: Sat, 31 Jan 2015 14:51:25 +0100
Subject: [PATCH] (partial) cleanup

---
 lib/c/2014/labcomm_decoder.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/lib/c/2014/labcomm_decoder.c b/lib/c/2014/labcomm_decoder.c
index 8c240c9..e042630 100644
--- a/lib/c/2014/labcomm_decoder.c
+++ b/lib/c/2014/labcomm_decoder.c
@@ -199,6 +199,7 @@ static int decode_type_binding(struct labcomm_decoder *d, int kind)
 out:
   return result;
 } 
+#ifdef OLD_TYPEDEF_DECODING_TEST_CODE 
 static int decode_type_def(struct labcomm_decoder *d, int kind){
   int i, remote_index, result;
   char *name;
@@ -241,6 +242,7 @@ free_signature_name:
 out:
   return result;
 }
+#endif
 
 static int decode_sample_def_or_ref(struct labcomm_decoder *d, int kind)
 {
@@ -444,9 +446,13 @@ int labcomm_decoder_decode_one(struct labcomm_decoder *d)
     result = decode_sample_def_or_ref(d, LABCOMM_SAMPLE_REF); 
   } else if (remote_index == LABCOMM_TYPE_DEF) {
     result = decode_and_handle(d, d, remote_index);
-    if(result == -ENOENT) {
-        printf("*** no handler for typedef...");
+    if(result == -ENOENT) { 
+        //No handler for typedefs, skip
+#ifdef OLD_TYPEDEF_DECODING_TEST_CODE 
         result = decode_type_def(d, LABCOMM_TYPE_DEF); 
+#else
+        result = decoder_skip(d, length, remote_index);
+#endif
     }
   } else if (remote_index == LABCOMM_TYPE_BINDING) {
     result = decode_type_binding(d, LABCOMM_TYPE_BINDING); 
-- 
GitLab