diff options
| author | Nalin Dahyabhai <nalin.dahyabhai@pobox.com> | 2008-05-29 17:17:42 -0400 |
|---|---|---|
| committer | Nalin Dahyabhai <nalin.dahyabhai@pobox.com> | 2008-05-29 17:17:42 -0400 |
| commit | eaab9967ad572087592d56084ac324513ec22ae6 (patch) | |
| tree | ac878a5e22502c4b7025950b4fd90bbee7b41524 /src/plugin.c | |
| parent | 3a581cea65b2bd2784fed8d96a7ac803b33074c5 (diff) | |
| download | slapi-nis-eaab9967ad572087592d56084ac324513ec22ae6.tar.gz slapi-nis-eaab9967ad572087592d56084ac324513ec22ae6.tar.xz slapi-nis-eaab9967ad572087592d56084ac324513ec22ae6.zip | |
- build cleanups
- remove some more NSPRisms in cases when XDRisms are even more portable
Diffstat (limited to 'src/plugin.c')
| -rw-r--r-- | src/plugin.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/src/plugin.c b/src/plugin.c index f9e586d..7f49352 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -19,10 +19,13 @@ #include <rpc/pmap_clnt.h> #include <rpcsvc/yp_prot.h> +#ifdef HAVE_DIRSRV_SLAPI_PLUGIN_H #include <nspr.h> -#include <secport.h> -#include <plarenas.h> +#include <nss.h> #include <dirsrv/slapi-plugin.h> +#else +#include <slapi-plugin.h> +#endif #include "dispatch.h" #include "map.h" @@ -123,19 +126,13 @@ plugin_state_init(Slapi_PBlock *pb, struct plugin_state **lstate) { int sockfd = -1, err, i; struct plugin_state *state = NULL; - PLArenaPool *arena = NULL; struct sockaddr_in sin; struct sockaddr_in6 sin6; - arena = PORT_NewArena(sizeof(double)); - if (arena == NULL) { - goto failed; - } - state = PORT_ArenaZAlloc(arena, sizeof(*state)); + state = malloc(sizeof(*state)); if (state == NULL) { goto failed; } - state->arena = arena; state->plugin_base = NULL; state->plugin_desc = &plugin_description; slapi_pblock_get(pb, SLAPI_PLUGIN_IDENTITY, &state->plugin_identity); @@ -245,9 +242,7 @@ plugin_state_init(Slapi_PBlock *pb, struct plugin_state **lstate) return 0; failed: err = errno; - if (arena != NULL) { - PORT_FreeArena(arena, PR_TRUE); - } + free(state); errno = err; return -1; } |
