#include "string.h"
#include "afh.h"
#include "afs.h"
-#include "server.h"
#include "net.h"
+#include "server.h"
#include "ipc.h"
#include "list.h"
#include "sched.h"
return socket_fd;
}
+static char *database_dir;
+
static void close_afs_tables(void)
{
int i;
PARA_NOTICE_LOG("closing afs_tables\n");
for (i = 0; i < NUM_AFS_TABLES; i++)
afs_tables[i].close();
+ free(database_dir);
+ database_dir = NULL;
}
-static char *database_dir;
-
static void get_database_dir(void)
{
if (!database_dir) {
ret = afs_tables[i].open(database_dir);
if (ret >= 0)
continue;
- PARA_ERROR_LOG("%s open: %s\n", afs_tables[i].name,
- para_strerror(-ret));
+ PARA_ERROR_LOG("could not open %s\n", afs_tables[i].name);
break;
}
if (ret >= 0)
close_afs_tables();
out:
signal_shutdown(signal_task);
+ free_status_items();
+ free(current_mop);
free_lpr();
if (ret < 0)
PARA_EMERG_LOG("%s\n", para_strerror(-ret));
int i, ret;
close_afs_tables();
+ get_database_dir();
for (i = 0; i < NUM_AFS_TABLES; i++) {
struct afs_table *t = &afs_tables[i];