summaryrefslogtreecommitdiffstats
path: root/src/back-shr.c
diff options
context:
space:
mode:
authorNalin Dahyabhai <nalin.dahyabhai@pobox.com>2008-07-10 15:15:18 -0400
committerNalin Dahyabhai <nalin.dahyabhai@pobox.com>2008-07-10 15:15:18 -0400
commit457cf54b708015520a8566088930c9c4f5bd6677 (patch)
tree3fc77fe5bd9e01a7a9dcfe0a96f710fc3f6a6d13 /src/back-shr.c
parent2449787acdf32013ea3b102e272e704f4dbd9517 (diff)
downloadslapi-nis-457cf54b708015520a8566088930c9c4f5bd6677.tar.gz
slapi-nis-457cf54b708015520a8566088930c9c4f5bd6677.tar.xz
slapi-nis-457cf54b708015520a8566088930c9c4f5bd6677.zip
- add a helper for checking if we've been called by ourselves
- if a search was initiated by us, don't bother (and also don't deadlock)
Diffstat (limited to 'src/back-shr.c')
-rw-r--r--src/back-shr.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/back-shr.c b/src/back-shr.c
index e21f5ee..0561e11 100644
--- a/src/back-shr.c
+++ b/src/back-shr.c
@@ -49,6 +49,15 @@
#include "plugin.h"
#include "map.h"
+/* Check if the caller for the current operation is *us*. */
+bool_t
+backend_shr_is_caller(struct plugin_state *state, Slapi_PBlock *pb)
+{
+ Slapi_ComponentId *identity;
+ slapi_pblock_get(pb, SLAPI_PLUGIN_IDENTITY, &identity);
+ return (identity == state->plugin_identity);
+}
+
/* Read the name of this server. Used by the map module on behalf of the
* NIS service logic. */
void