The Samba-Bugzilla – Attachment 18254 Details for
Bug 15580
Packet marshalling push support missing for CTDB_CONTROL_TCP_CLIENT_DISCONNECTED and CTDB_CONTROL_TCP_CLIENT_PASSED
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for 4.20, 4.19, 4.18
BZ15580.patch (text/plain), 3.95 KB, created by
Martin Schwenke
on 2024-02-19 23:12:50 UTC
(
hide
)
Description:
Patch for 4.20, 4.19, 4.18
Filename:
MIME Type:
Creator:
Martin Schwenke
Created:
2024-02-19 23:12:50 UTC
Size:
3.95 KB
patch
obsolete
>From 0f493b9af365a7560273248017daa88dffb3fc49 Mon Sep 17 00:00:00 2001 >From: Martin Schwenke <mschwenke@ddn.com> >Date: Fri, 9 Feb 2024 17:29:46 +1100 >Subject: [PATCH] ctdb-protocol: Add missing push support for new controls > >CTDB_CONTROL_TCP_CLIENT_DISCONNECTED and >CTDB_CONTROL_TCP_CLIENT_PASSED were added in commits >c6602b686b4e50d93272667ef86d3904181fb1ab and >037e8e449deb136ad5ed5e4de05439411b545b6d. They were missing test >support for the packet push/pull. While adding the testing (for >completeness, before adding another new control) I noticed that the >push functionality was absent. This adds that, along with the test >support. > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=15580 > >Signed-off-by: Martin Schwenke <mschwenke@ddn.com> >Reviewed-by: Volker Lendecke <vl@samba.org> > >Autobuild-User(master): Volker Lendecke <vl@samba.org> >Autobuild-Date(master): Mon Feb 19 10:21:48 UTC 2024 on atb-devel-224 > >(cherry picked from commit dd9b11acbc4fbde1941719968aeb463b853b0ffb) >--- > ctdb/protocol/protocol_control.c | 8 +++++++ > ctdb/tests/src/protocol_common_ctdb.c | 33 +++++++++++++++++++++++++++ > ctdb/tests/src/protocol_ctdb_test.c | 2 +- > 3 files changed, 42 insertions(+), 1 deletion(-) > >diff --git a/ctdb/protocol/protocol_control.c b/ctdb/protocol/protocol_control.c >index 83ed6cb4ee1..e4491159937 100644 >--- a/ctdb/protocol/protocol_control.c >+++ b/ctdb/protocol/protocol_control.c >@@ -693,6 +693,14 @@ static void ctdb_req_control_data_push(struct ctdb_req_control_data *cd, > case CTDB_CONTROL_ECHO_DATA: > ctdb_echo_data_push(cd->data.echo_data, buf, &np); > break; >+ >+ case CTDB_CONTROL_TCP_CLIENT_DISCONNECTED: >+ ctdb_connection_push(cd->data.conn, buf, &np); >+ break; >+ >+ case CTDB_CONTROL_TCP_CLIENT_PASSED: >+ ctdb_connection_push(cd->data.conn, buf, &np); >+ break; > } > > *npush = np; >diff --git a/ctdb/tests/src/protocol_common_ctdb.c b/ctdb/tests/src/protocol_common_ctdb.c >index 384076824a4..8a8e114f67a 100644 >--- a/ctdb/tests/src/protocol_common_ctdb.c >+++ b/ctdb/tests/src/protocol_common_ctdb.c >@@ -593,6 +593,19 @@ void fill_ctdb_req_control_data(TALLOC_CTX *mem_ctx, > > case CTDB_CONTROL_ENABLE_NODE: > break; >+ >+ case CTDB_CONTROL_TCP_CLIENT_DISCONNECTED: >+ cd->data.conn = talloc(mem_ctx, struct ctdb_connection); >+ assert(cd->data.conn != NULL); >+ fill_ctdb_connection(mem_ctx, cd->data.conn); >+ break; >+ >+ case CTDB_CONTROL_TCP_CLIENT_PASSED: >+ cd->data.conn = talloc(mem_ctx, struct ctdb_connection); >+ assert(cd->data.conn != NULL); >+ fill_ctdb_connection(mem_ctx, cd->data.conn); >+ break; >+ > } > } > >@@ -982,6 +995,14 @@ void verify_ctdb_req_control_data(struct ctdb_req_control_data *cd, > > case CTDB_CONTROL_ENABLE_NODE: > break; >+ >+ case CTDB_CONTROL_TCP_CLIENT_DISCONNECTED: >+ verify_ctdb_connection(cd->data.conn, cd2->data.conn); >+ break; >+ >+ case CTDB_CONTROL_TCP_CLIENT_PASSED: >+ verify_ctdb_connection(cd->data.conn, cd2->data.conn); >+ break; > } > } > >@@ -1378,6 +1399,12 @@ void fill_ctdb_reply_control_data(TALLOC_CTX *mem_ctx, > > case CTDB_CONTROL_ENABLE_NODE: > break; >+ >+ case CTDB_CONTROL_TCP_CLIENT_DISCONNECTED: >+ break; >+ >+ case CTDB_CONTROL_TCP_CLIENT_PASSED: >+ break; > } > } > >@@ -1715,6 +1742,12 @@ void verify_ctdb_reply_control_data(struct ctdb_reply_control_data *cd, > > case CTDB_CONTROL_ENABLE_NODE: > break; >+ >+ case CTDB_CONTROL_TCP_CLIENT_DISCONNECTED: >+ break; >+ >+ case CTDB_CONTROL_TCP_CLIENT_PASSED: >+ break; > } > } > >diff --git a/ctdb/tests/src/protocol_ctdb_test.c b/ctdb/tests/src/protocol_ctdb_test.c >index f6fb5134a00..840d465ae30 100644 >--- a/ctdb/tests/src/protocol_ctdb_test.c >+++ b/ctdb/tests/src/protocol_ctdb_test.c >@@ -277,7 +277,7 @@ PROTOCOL_CTDB4_TEST(struct ctdb_req_dmaster, ctdb_req_dmaster, > PROTOCOL_CTDB4_TEST(struct ctdb_reply_dmaster, ctdb_reply_dmaster, > CTDB_REPLY_DMASTER); > >-#define NUM_CONTROLS 159 >+#define NUM_CONTROLS 161 > > PROTOCOL_CTDB2_TEST(struct ctdb_req_control_data, ctdb_req_control_data); > PROTOCOL_CTDB2_TEST(struct ctdb_reply_control_data, ctdb_reply_control_data); >-- >2.39.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
vl
:
review+
Actions:
View
Attachments on
bug 15580
: 18254