Debug messages display the value of the hDAA variable before it is initialized.
This patch moves involved lines after the getData() is called.


Signed-off-by: Roberto Sassu <[email protected]>
---
 src/tcs/rpc/tcstp/rpc_daa.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/tcs/rpc/tcstp/rpc_daa.c b/src/tcs/rpc/tcstp/rpc_daa.c
index 6da24a1..6b9c1c6 100644
--- a/src/tcs/rpc/tcstp/rpc_daa.c
+++ b/src/tcs/rpc/tcstp/rpc_daa.c
@@ -41,10 +41,9 @@ tcs_wrap_DaaJoin(struct tcsd_thread_data *data)
        if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm))
                return TCSERR(TSS_E_INTERNAL_ERROR);
 
-       LogDebugFn("thread %ld hDAA %x", THREAD_ID, hDAA);
-
        if (getData(TCSD_PACKET_TYPE_UINT32, 1, &hDAA, 0, &data->comm))
                return TCSERR(TSS_E_INTERNAL_ERROR);
+       LogDebugFn("thread %ld hDAA %x", THREAD_ID, hDAA);
 
        if (getData(TCSD_PACKET_TYPE_BYTE, 2, &stage, 0, &data->comm))
                return TCSERR(TSS_E_INTERNAL_ERROR);
@@ -145,9 +144,9 @@ tcs_wrap_DaaSign(struct tcsd_thread_data *data)
        if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm))
                return TCSERR(TSS_E_INTERNAL_ERROR);
 
-       LogDebugFn("thread %ld hDAA %x", THREAD_ID, hDAA);
        if (getData(TCSD_PACKET_TYPE_UINT32, 1, &hDAA, 0, &data->comm))
                return TCSERR(TSS_E_INTERNAL_ERROR);
+       LogDebugFn("thread %ld hDAA %x", THREAD_ID, hDAA);
 
        if (getData(TCSD_PACKET_TYPE_BYTE, 2, &stage, 0, &data->comm))
                return TCSERR(TSS_E_INTERNAL_ERROR);
-- 
1.7.2.2


------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
TrouSerS-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/trousers-tech

Reply via email to