midltests: make it possible to allow downgrades to NDR32
authorStefan Metzmacher <metze@samba.org>
Wed, 29 Sep 2010 00:35:54 +0000 (02:35 +0200)
committerStefan Metzmacher <metze@samba.org>
Wed, 29 Sep 2010 01:08:24 +0000 (03:08 +0200)
metze

testprogs/win32/midltests/midltests_tcp.c

index ca01c62c95d57c8a4b971a1f4de3d7bd2e1e46d1..41a698c3a95e257d32df554aed895bebfc7ab3e3 100644 (file)
@@ -197,13 +197,17 @@ static void change_packet(const char *ctx, BOOL ndr64,
                        buf[24+0x48] = 0xFF;
                        printf("%s: disable NDR64\n\n", ctx);
                } else if (buf[24] < 3 && ndr64) {
-                       buf[24] = 0x00;
+                       printf("\n%s: got NDR32 downgrade\n\n", ctx);
+#ifndef DONOT_FORCE_NDR64
                        printf("\n\tERROR!!!\n\n");
-                       printf("%s: disable NDR32\n", ctx);
-                       printf("\n");
+                       buf[24] = 0x00;
                        printf("You may need to run 'vcvarsall.bat amd64' before 'nmake tcp'\n");
-               } else {
+#endif
+                       printf("\n");
+               } else if (buf[24] == 3 && ndr64) {
                        printf("%s: got NDR64\n\n", ctx);
+               } else {
+                       printf("%s: got NDR32\n\n", ctx);
                }
                //printf("%s: bind with %u pres\n", ctx, buf[24]);
                fflush(stdout);