More patches from the attic
Volker Lendecke
Volker.Lendecke at SerNet.DE
Mon Aug 12 08:05:31 MDT 2013
Hi!
Please review&push!
Thanks,
Volker
--
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
-------------- next part --------------
From 92434e5246ffc600e8660abfaf4ef4aba5e12ac3 Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Thu, 6 Jun 2013 11:42:15 +0200
Subject: [PATCH 1/3] tevent: Add tevent_received to tevent_req_simple_recv_ntstatus
Signed-off-by: Volker Lendecke <vl at samba.org>
---
lib/util/tevent_ntstatus.c | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/lib/util/tevent_ntstatus.c b/lib/util/tevent_ntstatus.c
index cbbc698..7659f15 100644
--- a/lib/util/tevent_ntstatus.c
+++ b/lib/util/tevent_ntstatus.c
@@ -76,12 +76,15 @@ bool tevent_req_is_nterror(struct tevent_req *req, NTSTATUS *status)
NTSTATUS tevent_req_simple_recv_ntstatus(struct tevent_req *req)
{
- NTSTATUS status;
+ NTSTATUS status = NT_STATUS_OK;
- if (tevent_req_is_nterror(req, &status)) {
- return status;
- }
- return NT_STATUS_OK;
+ /*
+ * Ignore result of tevent_req_is_nterror, we're only interested in
+ * the status
+ */
+ tevent_req_is_nterror(req, &status);
+ tevent_req_received(req);
+ return status;
}
void tevent_req_simple_finish_ntstatus(struct tevent_req *subreq,
--
1.7.0.4
From 841cebfe07354d2fe029e0538ad0602be81dd8e5 Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Thu, 6 Jun 2013 11:42:55 +0200
Subject: [PATCH 2/3] librpc: Use tevent_req_simple_recv_ntstatus
Signed-off-by: Volker Lendecke <vl at samba.org>
---
librpc/rpc/binding_handle.c | 10 +---------
1 files changed, 1 insertions(+), 9 deletions(-)
diff --git a/librpc/rpc/binding_handle.c b/librpc/rpc/binding_handle.c
index 9354bbd..3c74fdf 100644
--- a/librpc/rpc/binding_handle.c
+++ b/librpc/rpc/binding_handle.c
@@ -494,15 +494,7 @@ static void dcerpc_binding_handle_call_done(struct tevent_req *subreq)
NTSTATUS dcerpc_binding_handle_call_recv(struct tevent_req *req)
{
- NTSTATUS error;
-
- if (tevent_req_is_nterror(req, &error)) {
- tevent_req_received(req);
- return error;
- }
-
- tevent_req_received(req);
- return NT_STATUS_OK;
+ return tevent_req_simple_recv_ntstatus(req);
}
NTSTATUS dcerpc_binding_handle_call(struct dcerpc_binding_handle *h,
--
1.7.0.4
From b8cf73f5fd538fd957a69244001c4e6332f96faa Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Tue, 11 Jun 2013 19:37:47 +0200
Subject: [PATCH 3/3] rpc_server3: Fix two const warnings
Signed-off-by: Volker Lendecke <vl at samba.org>
---
source3/rpc_server/rpc_sock_helper.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/source3/rpc_server/rpc_sock_helper.c b/source3/rpc_server/rpc_sock_helper.c
index dc88f25..650dd9d 100644
--- a/source3/rpc_server/rpc_sock_helper.c
+++ b/source3/rpc_server/rpc_sock_helper.c
@@ -73,7 +73,7 @@ NTSTATUS rpc_create_tcpip_sockets(const struct ndr_interface_table *iface,
if (bvec != NULL) {
rc = tsocket_address_bsd_from_sockaddr(tmp_ctx,
- (struct sockaddr *)ifss,
+ (const struct sockaddr *)ifss,
sizeof(struct sockaddr_storage),
&bind_addr);
if (rc < 0) {
@@ -197,7 +197,7 @@ NTSTATUS rpc_setup_tcpip_sockets(struct tevent_context *ev_ctx,
if (bvec != NULL) {
rc = tsocket_address_bsd_from_sockaddr(tmp_ctx,
- (struct sockaddr*)ifss,
+ (const struct sockaddr*)ifss,
sizeof(struct sockaddr_storage),
&bind_addr);
if (rc < 0) {
--
1.7.0.4
More information about the samba-technical
mailing list