From 14b73135430d7636e418746529ba2d38f8e9de6f Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 1 May 2005 06:55:39 +0000 Subject: [PATCH] r6541: added double pointer test to win32 echo client (This used to be commit cb4e07744d87970719c69f8553900efa507589ce) --- testprogs/win32/rpcecho/client.c | 17 +++++++++++++++++ testprogs/win32/rpcecho/server.c | 2 ++ 2 files changed, 19 insertions(+) diff --git a/testprogs/win32/rpcecho/client.c b/testprogs/win32/rpcecho/client.c index 1724f482c38..9d06f8e3116 100644 --- a/testprogs/win32/rpcecho/client.c +++ b/testprogs/win32/rpcecho/client.c @@ -301,6 +301,23 @@ void main(int argc, char **argv) continue; } + if (strcmp(argv[0], "double") == 0) { + typedef unsigned short uint16; + uint16 v = 13; + uint16 *pv = &v; + uint16 **ppv = &pv; + uint16 ret; + + argc -= 1; + argv += 1; + + ret = echo_TestDoublePointer(&ppv); + + printf("TestDoublePointer v=%d ret=%d\n", v, ret); + + continue; + } + if (strcmp(argv[0], "sleep") == 0) { long arg, result; diff --git a/testprogs/win32/rpcecho/server.c b/testprogs/win32/rpcecho/server.c index 17b13f0013d..b5127596dfc 100644 --- a/testprogs/win32/rpcecho/server.c +++ b/testprogs/win32/rpcecho/server.c @@ -142,9 +142,11 @@ void echo_TestSurrounding(echo_Surrounding *data) short echo_TestDoublePointer(short ***data) { if (!*data) { + printf("WARNING: *data == NULL\n"); return 0; } if (!**data) { + printf("WARNING: **data == NULL\n"); return 0; } printf("Incoming double pointer: %d\n", ***data); -- 2.34.1