diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-05-01 06:55:39 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:16:24 -0500 |
commit | 14b73135430d7636e418746529ba2d38f8e9de6f (patch) | |
tree | 9fa8909d7808b97f49e3ba97cae42ea795aec480 /testprogs/win32 | |
parent | 9d87efb681c73e892c8690679238b9dc1d971a9c (diff) | |
download | samba-14b73135430d7636e418746529ba2d38f8e9de6f.tar.gz samba-14b73135430d7636e418746529ba2d38f8e9de6f.tar.bz2 samba-14b73135430d7636e418746529ba2d38f8e9de6f.zip |
r6541: added double pointer test to win32 echo client
(This used to be commit cb4e07744d87970719c69f8553900efa507589ce)
Diffstat (limited to 'testprogs/win32')
-rw-r--r-- | testprogs/win32/rpcecho/client.c | 17 | ||||
-rw-r--r-- | testprogs/win32/rpcecho/server.c | 2 |
2 files changed, 19 insertions, 0 deletions
diff --git a/testprogs/win32/rpcecho/client.c b/testprogs/win32/rpcecho/client.c index 1724f482c3..9d06f8e311 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 17b13f0013..b5127596df 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); |