Order switch statements
authorSamuel Cabrero <scabrero@zentyal.com>
Sun, 6 Jul 2014 20:02:42 +0000 (22:02 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 7 Jul 2014 05:47:44 +0000 (07:47 +0200)
Signed-off-by: Samuel Cabrero <scabrero@zentyal.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Jul  7 07:47:44 CEST 2014 on sn-devel-104

source4/dsdb/repl/drepl_out_helpers.c
source4/libnet/libnet_become_dc.c
source4/libnet/libnet_unbecome_dc.c
source4/torture/drs/rpc/dssync.c
source4/torture/drs/rpc/msds_intid.c
source4/torture/rpc/dsgetinfo.c

index 22d44f0..3054323 100644 (file)
@@ -176,16 +176,6 @@ static void dreplsrv_out_drsuapi_bind_done(struct tevent_req *subreq)
                        info28->repl_epoch              = 0;
                        break;
                }
-               case 48: {
-                       struct drsuapi_DsBindInfo48 *info48;
-                       info48 = &state->bind_r.out.bind_info->info.info48;
-
-                       info28->supported_extensions    = info48->supported_extensions;
-                       info28->site_guid               = info48->site_guid;
-                       info28->pid                     = info48->pid;
-                       info28->repl_epoch              = info48->repl_epoch;
-                       break;
-               }
                case 28: {
                        *info28 = state->bind_r.out.bind_info->info.info28;
                        break;
@@ -200,6 +190,16 @@ static void dreplsrv_out_drsuapi_bind_done(struct tevent_req *subreq)
                        info28->repl_epoch              = info32->repl_epoch;
                        break;
                }
+               case 48: {
+                       struct drsuapi_DsBindInfo48 *info48;
+                       info48 = &state->bind_r.out.bind_info->info.info48;
+
+                       info28->supported_extensions    = info48->supported_extensions;
+                       info28->site_guid               = info48->site_guid;
+                       info28->pid                     = info48->pid;
+                       info28->repl_epoch              = info48->repl_epoch;
+                       break;
+               }
                case 52: {
                        struct drsuapi_DsBindInfo52 *info52;
                        info52 = &state->bind_r.out.bind_info->info.info52;
index 55ac48c..36e70c5 100644 (file)
@@ -1703,15 +1703,6 @@ static WERROR becomeDC_drsuapi_bind_recv(struct libnet_BecomeDC_state *s,
                        drsuapi->remote_info28.repl_epoch               = 0;
                        break;
                }
-               case 48: {
-                       struct drsuapi_DsBindInfo48 *info48;
-                       info48 = &drsuapi->bind_r.out.bind_info->info.info48;
-                       drsuapi->remote_info28.supported_extensions     = info48->supported_extensions;
-                       drsuapi->remote_info28.site_guid                = info48->site_guid;
-                       drsuapi->remote_info28.pid                      = info48->pid;
-                       drsuapi->remote_info28.repl_epoch               = info48->repl_epoch;
-                       break;
-               }
                case 28: {
                        drsuapi->remote_info28 = drsuapi->bind_r.out.bind_info->info.info28;
                        break;
@@ -1725,6 +1716,15 @@ static WERROR becomeDC_drsuapi_bind_recv(struct libnet_BecomeDC_state *s,
                        drsuapi->remote_info28.repl_epoch               = info32->repl_epoch;
                        break;
                }
+               case 48: {
+                       struct drsuapi_DsBindInfo48 *info48;
+                       info48 = &drsuapi->bind_r.out.bind_info->info.info48;
+                       drsuapi->remote_info28.supported_extensions     = info48->supported_extensions;
+                       drsuapi->remote_info28.site_guid                = info48->site_guid;
+                       drsuapi->remote_info28.pid                      = info48->pid;
+                       drsuapi->remote_info28.repl_epoch               = info48->repl_epoch;
+                       break;
+               }
                case 52: {
                        struct drsuapi_DsBindInfo52 *info52;
                        info52 = &drsuapi->bind_r.out.bind_info->info.info52;
index 2ff7b1c..38d6a94 100644 (file)
@@ -640,15 +640,6 @@ static void unbecomeDC_drsuapi_bind_recv(struct tevent_req *subreq)
                        s->drsuapi.remote_info28.repl_epoch             = 0;
                        break;
                }
-               case 48: {
-                       struct drsuapi_DsBindInfo48 *info48;
-                       info48 = &s->drsuapi.bind_r.out.bind_info->info.info48;
-                       s->drsuapi.remote_info28.supported_extensions   = info48->supported_extensions;
-                       s->drsuapi.remote_info28.site_guid              = info48->site_guid;
-                       s->drsuapi.remote_info28.pid                    = info48->pid;
-                       s->drsuapi.remote_info28.repl_epoch             = info48->repl_epoch;
-                       break;
-               }
                case 28: {
                        s->drsuapi.remote_info28 = s->drsuapi.bind_r.out.bind_info->info.info28;
                        break;
@@ -662,6 +653,15 @@ static void unbecomeDC_drsuapi_bind_recv(struct tevent_req *subreq)
                        s->drsuapi.remote_info28.repl_epoch             = info32->repl_epoch;
                        break;
                }
+               case 48: {
+                       struct drsuapi_DsBindInfo48 *info48;
+                       info48 = &s->drsuapi.bind_r.out.bind_info->info.info48;
+                       s->drsuapi.remote_info28.supported_extensions   = info48->supported_extensions;
+                       s->drsuapi.remote_info28.site_guid              = info48->site_guid;
+                       s->drsuapi.remote_info28.pid                    = info48->pid;
+                       s->drsuapi.remote_info28.repl_epoch             = info48->repl_epoch;
+                       break;
+               }
                case 52: {
                        struct drsuapi_DsBindInfo52 *info52;
                        info52 = &s->drsuapi.bind_r.out.bind_info->info.info52;
index 0f13ea5..80e237b 100644 (file)
@@ -237,15 +237,6 @@ static bool _test_DsBind(struct torture_context *tctx,
                        b->peer_bind_info28.repl_epoch          = 0;
                        break;
                }
-               case 48: {
-                       struct drsuapi_DsBindInfo48 *info48;
-                       info48 = &b->req.out.bind_info->info.info48;
-                       b->peer_bind_info28.supported_extensions= info48->supported_extensions;
-                       b->peer_bind_info28.site_guid           = info48->site_guid;
-                       b->peer_bind_info28.pid                 = info48->pid;
-                       b->peer_bind_info28.repl_epoch          = info48->repl_epoch;
-                       break;
-               }
                case 28: {
                        b->peer_bind_info28 = b->req.out.bind_info->info.info28;
                        break;
@@ -259,6 +250,15 @@ static bool _test_DsBind(struct torture_context *tctx,
                        b->peer_bind_info28.repl_epoch          = info32->repl_epoch;
                        break;
                }
+               case 48: {
+                       struct drsuapi_DsBindInfo48 *info48;
+                       info48 = &b->req.out.bind_info->info.info48;
+                       b->peer_bind_info28.supported_extensions= info48->supported_extensions;
+                       b->peer_bind_info28.site_guid           = info48->site_guid;
+                       b->peer_bind_info28.pid                 = info48->pid;
+                       b->peer_bind_info28.repl_epoch          = info48->repl_epoch;
+                       break;
+               }
                case 52: {
                        struct drsuapi_DsBindInfo52 *info52;
                        info52 = &b->req.out.bind_info->info.info52;
index b93f70a..9d84047 100644 (file)
@@ -244,10 +244,6 @@ static bool _test_DsaBind(struct torture_context *tctx,
                bi->srv_info48.repl_epoch               = info28->repl_epoch;
                break;
        }
-       case 48: {
-               bi->srv_info48 = r.out.bind_info->info.info48;
-               break;
-       }
        case 32: {
                struct drsuapi_DsBindInfo32 *info32;
                info32 = &r.out.bind_info->info.info32;
@@ -257,6 +253,10 @@ static bool _test_DsaBind(struct torture_context *tctx,
                bi->srv_info48.repl_epoch               = info32->repl_epoch;
                break;
        }
+       case 48: {
+               bi->srv_info48 = r.out.bind_info->info.info48;
+               break;
+       }
        case 52: {
                struct drsuapi_DsBindInfo52 *info52;
                info52 = &r.out.bind_info->info.info52;
index 93c8b2d..bbe7a3b 100644 (file)
@@ -195,15 +195,6 @@ static bool _test_DsBind(struct torture_context *tctx,
                        b->peer_bind_info28.repl_epoch          = 0;
                        break;
                }
-               case 48: {
-                       struct drsuapi_DsBindInfo48 *info48;
-                       info48 = &b->req.out.bind_info->info.info48;
-                       b->peer_bind_info28.supported_extensions= info48->supported_extensions;
-                       b->peer_bind_info28.site_guid           = info48->site_guid;
-                       b->peer_bind_info28.pid                 = info48->pid;
-                       b->peer_bind_info28.repl_epoch          = info48->repl_epoch;
-                       break;
-               }
                case 28: {
                        b->peer_bind_info28 = b->req.out.bind_info->info.info28;
                        break;
@@ -217,6 +208,15 @@ static bool _test_DsBind(struct torture_context *tctx,
                        b->peer_bind_info28.repl_epoch          = info32->repl_epoch;
                        break;
                }
+               case 48: {
+                       struct drsuapi_DsBindInfo48 *info48;
+                       info48 = &b->req.out.bind_info->info.info48;
+                       b->peer_bind_info28.supported_extensions= info48->supported_extensions;
+                       b->peer_bind_info28.site_guid           = info48->site_guid;
+                       b->peer_bind_info28.pid                 = info48->pid;
+                       b->peer_bind_info28.repl_epoch          = info48->repl_epoch;
+                       break;
+               }
                case 52: {
                        struct drsuapi_DsBindInfo52 *info52;
                        info52 = &b->req.out.bind_info->info.info52;