X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=AcessNative%2Fld-acess_src%2Frequest.c;h=fdf57485e860e61e02aa3fe0a1d87a459245bc56;hb=0e1f2361c44760869b3b7164217e00889884b976;hp=2fa481a7f892032e9d937d91654e8a2d21cd5077;hpb=c18c6fea968e72403f9a7b75d6f7f8e3f9e8757f;p=tpg%2Facess2.git diff --git a/AcessNative/ld-acess_src/request.c b/AcessNative/ld-acess_src/request.c index 2fa481a7..fdf57485 100644 --- a/AcessNative/ld-acess_src/request.c +++ b/AcessNative/ld-acess_src/request.c @@ -1,7 +1,11 @@ /* + * AcessNative ld-acess dynamic linker + * - By John Hodge (thePowersGang) + * + * request.c + * - IPC interface */ -#define DEBUG 1 - +#define DEBUG 0 #if DEBUG # define DEBUG_S printf @@ -243,6 +247,38 @@ int SendRequest(tRequestHeader *Request, int RequestSize, int ResponseSize) if( recvbytes > expbytes ) { // TODO: Warning } + + #if DEBUG + { + int i; + char *data = (char*)&Request->Params[Request->NParams]; + DEBUG_S(" Reply:"); + for( i = 0; i < Request->NParams; i ++ ) + { + switch(Request->Params[i].Type) + { + case ARG_TYPE_INT32: + DEBUG_S(" 0x%08x", *(uint32_t*)data); + data += sizeof(uint32_t); + break; + case ARG_TYPE_INT64: + DEBUG_S(" 0x%016"PRIx64"", *(uint64_t*)data); + data += sizeof(uint64_t); + break; + case ARG_TYPE_STRING: + DEBUG_S(" '%s'", (char*)data); + data += Request->Params[i].Length; + break; + case ARG_TYPE_DATA: + DEBUG_S(" %p:0x%x", (char*)data, Request->Params[i].Length); + if( !(Request->Params[i].Flags & ARG_FLAG_ZEROED) ) + data += Request->Params[i].Length; + break; + } + } + DEBUG_S("\n"); + } + #endif return recvbytes; }