summaryrefslogtreecommitdiffstats
path: root/lib/libadmin
diff options
context:
space:
mode:
authorRich Megginson <rmeggins@redhat.com>2005-02-24 21:47:07 +0000
committerRich Megginson <rmeggins@redhat.com>2005-02-24 21:47:07 +0000
commit6703f63899ba102659292134a5abccc690fecae6 (patch)
tree86909fa808fb8c0cd38046d4b0bc20c1806e9c09 /lib/libadmin
parent370d483a51167d5b9e7cf936a03f3bb42cae5cd4 (diff)
downloadds-6703f63899ba102659292134a5abccc690fecae6.tar.gz
ds-6703f63899ba102659292134a5abccc690fecae6.tar.xz
ds-6703f63899ba102659292134a5abccc690fecae6.zip
get rid of adminutil dependency on core DS
Diffstat (limited to 'lib/libadmin')
-rw-r--r--lib/libadmin/error.c2
-rw-r--r--lib/libadmin/strlist.c46
-rw-r--r--lib/libadmin/util.c2
3 files changed, 3 insertions, 47 deletions
diff --git a/lib/libadmin/error.c b/lib/libadmin/error.c
index 2c3d740c..29ad0c93 100644
--- a/lib/libadmin/error.c
+++ b/lib/libadmin/error.c
@@ -63,7 +63,9 @@ void _report_error(int type, char *info, char *details, int shouldexit)
fprintf(stdout, "</SCRIPT>\n");
if(shouldexit) {
+#ifdef XP_WIN32
WSACleanup();
+#endif
exit(0);
}
}
diff --git a/lib/libadmin/strlist.c b/lib/libadmin/strlist.c
deleted file mode 100644
index 46a0c600..00000000
--- a/lib/libadmin/strlist.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/** BEGIN COPYRIGHT BLOCK
- * Copyright 2001 Sun Microsystems, Inc.
- * Portions copyright 1999, 2001-2003 Netscape Communications Corporation.
- * All rights reserved.
- * END COPYRIGHT BLOCK **/
-/*
- * strlist.c: Managing a handle to a list of strings
- *
- * All blame to Mike McCool
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "netsite.h"
-#include <libadmin/libadmin.h>
-
-NSAPI_PUBLIC char **new_strlist(int size)
-{
- char **new_list;
- register int x;
-
- new_list = (char **) MALLOC((size+1)*(sizeof(char *)));
-/* <= so we get the one right after the given size as well */
- for(x=0; x<= size; x++)
- new_list[x] = NULL;
-
- return new_list;
-}
-
-NSAPI_PUBLIC char **grow_strlist(char **strlist, int newsize)
-{
- char **ans;
-
- ans = (char **) REALLOC(strlist, (newsize+1)*sizeof(char *));
-
- return ans;
-}
-
-NSAPI_PUBLIC void free_strlist(char **strlist)
-{
- int x;
-
- for(x=0; (strlist[x]); x++) free(strlist[x]);
- free(strlist);
-}
diff --git a/lib/libadmin/util.c b/lib/libadmin/util.c
index 4af302f0..66795795 100644
--- a/lib/libadmin/util.c
+++ b/lib/libadmin/util.c
@@ -50,7 +50,7 @@ FILE *fopen_l(char *path, char *mode)
FILE *f = fopen(path, mode);
char *lockpath;
char *sn="admserv";
- char *flp=FILE_LOCK_PATH;
+ char *flp=get_flock_path();
if(f == NULL) return NULL;
lockpath=(char *) MALLOC(strlen(sn)+strlen(flp)+16);