diff options
author | Nalin Dahyabhai <nalin.dahyabhai@pobox.com> | 2008-04-02 18:47:52 -0400 |
---|---|---|
committer | Nalin Dahyabhai <nalin.dahyabhai@pobox.com> | 2008-04-02 18:47:52 -0400 |
commit | f6df72229f3e0849135095ceedbb0785b7d6debf (patch) | |
tree | f5076a600be7d62357296abd6da90beef4439e0c /src | |
parent | f499e75251c463f2d736b19b60daec49a32b6faf (diff) | |
download | slapi-nis-f6df72229f3e0849135095ceedbb0785b7d6debf.tar.gz slapi-nis-f6df72229f3e0849135095ceedbb0785b7d6debf.tar.xz slapi-nis-f6df72229f3e0849135095ceedbb0785b7d6debf.zip |
- stub out where we'll be providing data
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile | 2 | ||||
-rw-r--r-- | src/backend.c | 18 | ||||
-rw-r--r-- | src/backend.h | 3 | ||||
-rw-r--r-- | src/dummymap.c | 1 | ||||
-rw-r--r-- | src/map.c | 7 |
5 files changed, 28 insertions, 3 deletions
diff --git a/src/Makefile b/src/Makefile index 8176f4a..3affeaf 100644 --- a/src/Makefile +++ b/src/Makefile @@ -3,7 +3,7 @@ LDFLAGS = -lnsl -lpthread all:: plugin.so dummyplugin.so portmap -plugin.so: dispatch.c map.c nis.c plugin.c portmap.c +plugin.so: backend.c dispatch.c map.c nis.c plugin.c portmap.c $(CC) $(CFLAGS) -shared -o $@ $^ $(LDFLAGS) dummyplugin.so: dispatch.c dummymap.c nis.c plugin.c portmap.c $(CC) $(CFLAGS) -shared -o $@ $^ $(LDFLAGS) diff --git a/src/backend.c b/src/backend.c new file mode 100644 index 0000000..784d247 --- /dev/null +++ b/src/backend.c @@ -0,0 +1,18 @@ +#ifdef HAVE_CONFIG_H +#include "../config.h" +#endif + +#include <sys/types.h> +#include <string.h> +#include <unistd.h> + +#include <nspr.h> +#include <secport.h> +#include <plarenas.h> + +#include "backend.h" + +void +backend_init(struct plugin_state *state) +{ +} diff --git a/src/backend.h b/src/backend.h new file mode 100644 index 0000000..0f92a76 --- /dev/null +++ b/src/backend.h @@ -0,0 +1,3 @@ +/* Initialize maps. */ +struct plugin_state; +void backend_init(struct plugin_state *state); diff --git a/src/dummymap.c b/src/dummymap.c index ce257d5..5cb8436 100644 --- a/src/dummymap.c +++ b/src/dummymap.c @@ -3,7 +3,6 @@ #endif #include <sys/types.h> -#include <assert.h> #include <stdlib.h> #include <string.h> #include <time.h> @@ -3,8 +3,8 @@ #endif #include <sys/types.h> -#include <assert.h> #include <stdlib.h> +#include <time.h> #include <string.h> #include <unistd.h> @@ -14,6 +14,7 @@ #include <secport.h> #include <plarenas.h> +#include "backend.h" #include "dispatch.h" #include "map.h" #include "portmap.h" @@ -422,6 +423,7 @@ map_data_unset_entry_key(struct plugin_state *state, map = map_data_find_map(state, domain_name, map_name); entry = map_data_find_map_entry(state, map, key_len, key); map_data_unset_map_entry(state, map, entry); + map->last_changed = time(NULL); } void @@ -435,6 +437,7 @@ map_data_unset_entry_id(struct plugin_state *state, map = map_data_find_map(state, domain_name, map_name); entry = map_data_find_map_entry_id(state, map, id); map_data_unset_map_entry(state, map, entry); + map->last_changed = time(NULL); } /* Add an entry to a map. */ @@ -483,9 +486,11 @@ map_data_set_entry(struct plugin_state *state, } } } + map->last_changed = time(NULL); } void map_init(struct plugin_state *state) { + backend_init(state); } |