From: Stefan Metzmacher Date: Tue, 11 Feb 2025 11:45:06 +0000 (+0100) Subject: s3:tldap: add tldap_msg_rc() helper X-Git-Tag: tevent-0.17.0~685 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=af0b91221544635597f70eab42eaa0e2c7fd89da;p=thirdparty%2Fsamba.git s3:tldap: add tldap_msg_rc() helper Signed-off-by: Stefan Metzmacher Reviewed-by: Ralph Boehme --- diff --git a/source3/include/tldap.h b/source3/include/tldap.h index c4275cf3985..d5e19fba6ec 100644 --- a/source3/include/tldap.h +++ b/source3/include/tldap.h @@ -284,6 +284,7 @@ TLDAPRC tldap_extended(struct tldap_context *ld, int tldap_msg_id(const struct tldap_message *msg); int tldap_msg_type(const struct tldap_message *msg); +TLDAPRC tldap_msg_rc(const struct tldap_message *msg); const char *tldap_msg_matcheddn(struct tldap_message *msg); const char *tldap_msg_diagnosticmessage(struct tldap_message *msg); const char *tldap_msg_referral(struct tldap_message *msg); diff --git a/source3/lib/tldap.c b/source3/lib/tldap.c index 09006f873f0..f89306d2acd 100644 --- a/source3/lib/tldap.c +++ b/source3/lib/tldap.c @@ -2801,6 +2801,15 @@ int tldap_msg_type(const struct tldap_message *msg) return msg->type; } +TLDAPRC tldap_msg_rc(const struct tldap_message *msg) +{ + if (msg == NULL) { + return TLDAP_LOCAL_ERROR; + } + + return msg->lderr; +} + const char *tldap_msg_matcheddn(struct tldap_message *msg) { if (msg == NULL) {