summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2021-02-12 21:27:19 +0100
committerVolker Lendecke <vl@samba.org>2021-03-19 07:09:37 +0000
commit72540222c2290dc041fb01018de7febe44a4ac0d (patch)
tree4a4a0b78b890a8466389459f9e2ed7f27afb03ef /source3/include
parent8e54ed5a9cfcf497a51fe4b72387f255b9b0fa5e (diff)
downloadsamba-72540222c2290dc041fb01018de7febe44a4ac0d.tar.gz
lib: Properly return errno from open_socket_in()
Before this patch, open_socket_in() relied on quite a bit of code to not touch errno after for example socket() returned -1. Change this to explicitly save errno in "ret", such that a later DEBUG() with all its formatting code can mess it up. While there, remove the debuglevel parameter. I don't think this actually useful. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/proto.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 1d5ebecb03c..dd262529212 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -515,11 +515,11 @@ NTSTATUS receive_smb_raw(int fd,
unsigned int timeout,
size_t maxlen,
size_t *p_len);
-int open_socket_in(int type,
- uint16_t port,
- int dlevel,
- const struct sockaddr_storage *psock,
- bool rebind);
+int open_socket_in(
+ int type,
+ const struct sockaddr_storage *paddr,
+ uint16_t port,
+ bool rebind);
NTSTATUS open_socket_out(const struct sockaddr_storage *pss, uint16_t port,
int timeout, int *pfd);
struct tevent_req *open_socket_out_send(TALLOC_CTX *mem_ctx,