summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-07-16 22:18:43 +0200
committerVolker Lendecke <vl@samba.org>2008-07-16 23:19:48 +0200
commite65ea7471e2447ed150ade9a2c4f0a67663fb8d2 (patch)
treec5481349178cbe9471bffa2349ab86ec7f6af262 /source3/lib
parent1bd72938176fc49c7fedd499e4860da0c78a871b (diff)
downloadsamba-e65ea7471e2447ed150ade9a2c4f0a67663fb8d2.tar.gz
samba-e65ea7471e2447ed150ade9a2c4f0a67663fb8d2.tar.bz2
samba-e65ea7471e2447ed150ade9a2c4f0a67663fb8d2.zip
Add ndr_syntax_id_equal()
(This used to be commit 5fc90908deb417130af122941e084542304a2543)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/util_uuid.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source3/lib/util_uuid.c b/source3/lib/util_uuid.c
index 36c04e9b84..0d788ac8b4 100644
--- a/source3/lib/util_uuid.c
+++ b/source3/lib/util_uuid.c
@@ -130,4 +130,12 @@ char *guid_binstring(const struct GUID *guid)
return binary_string_rfc2254((char *)guid_flat.info, UUID_FLAT_SIZE);
}
-
+bool guid_equal(const struct GUID *g1, const struct GUID *g2)
+{
+ return ((g1->time_low == g2->time_low)
+ && (g1->time_mid == g2->time_mid)
+ && (g1->time_hi_and_version == g2->time_hi_and_version)
+ && (memcmp(g1->clock_seq, g2->clock_seq,
+ sizeof(g1->clock_seq)) == 0)
+ && (memcmp(g1->node, g2->node, sizeof(g1->node)) == 0));
+}