Trond Enger / d7a_1x

Fork of d7a_1x by WizziLab

Revision:
86:420918edb079
Parent:
85:197f67940c0d
Child:
88:dcebea09aac7
--- a/src/d7a_alp.cpp	Thu Feb 02 11:29:44 2017 +0000
+++ b/src/d7a_alp.cpp	Thu Feb 02 18:26:03 2017 +0000
@@ -11,7 +11,7 @@
 #include "sha.h"
 #include "d7a_typedefs.h"
 
-#if 0
+#if 1
     #define ALP_DPRINT(...)         DPRINT(__VA_ARGS__)
     #define ALP_DPRINT_DATA(...)    DPRINT_DATA(__VA_ARGS__)
     #define ALP_FPRINT(...)         FPRINT(__VA_ARGS__)
@@ -514,15 +514,15 @@
     uint8_t current_tag;
     d7a_msg_t** ret = NULL;
     
-    p += d7a_alp_construct_itf(p, addressee, retry, resp);
-    
     // malloc and init pointer array
     ret = d7a_alp_init_ret();
     
-    
     // Tag action
     p += d7a_alp_tag(p, true);
     
+    // Eventual forward
+    p += d7a_alp_construct_itf(p, addressee, retry, resp);
+    
     // get tag
     current_tag = g_alp_tag;
        
@@ -558,14 +558,15 @@
     uint8_t current_tag;
     d7a_msg_t** ret = NULL;
     
-    p += d7a_alp_construct_itf(p, addressee, retry, true);
-    
     // malloc and init pointer array
     ret = d7a_alp_init_ret();
         
     // Tag action
     p += d7a_alp_tag(p, true);
     
+    // Eventual forward
+    p += d7a_alp_construct_itf(p, addressee, retry, true);
+
     // get tag
     current_tag = g_alp_tag;
            
@@ -602,14 +603,15 @@
     uint8_t current_tag;
     d7a_msg_t** ret = NULL;
     
-    p += d7a_alp_construct_itf(p, addressee, retry, resp);
-    
     // malloc and init pointer array
     ret = d7a_alp_init_ret();
     
     // Tag action
     p += d7a_alp_tag(p, true);
     
+    // Eventual forward
+    p += d7a_alp_construct_itf(p, addressee, retry, resp);
+    
     // get tag
     current_tag = g_alp_tag;