Reindented server/core/gwdirs.c
This commit is contained in:
@ -1,3 +1,21 @@
|
|||||||
|
/*
|
||||||
|
* This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||||
|
* software: you can redistribute it and/or modify it under the terms of the
|
||||||
|
* GNU General Public License as published by the Free Software Foundation,
|
||||||
|
* version 2.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
|
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||||
|
* details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along with
|
||||||
|
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||||
|
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* Copyright MariaDB Corporation Ab 2013-2014
|
||||||
|
*/
|
||||||
|
|
||||||
#include <gwdirs.h>
|
#include <gwdirs.h>
|
||||||
|
|
||||||
void set_configdir(char* str)
|
void set_configdir(char* str)
|
||||||
@ -5,16 +23,19 @@ void set_configdir(char* str)
|
|||||||
free(configdir);
|
free(configdir);
|
||||||
configdir = str;
|
configdir = str;
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_logdir(char* str)
|
void set_logdir(char* str)
|
||||||
{
|
{
|
||||||
free(logdir);
|
free(logdir);
|
||||||
logdir = str;
|
logdir = str;
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_langdir(char* str)
|
void set_langdir(char* str)
|
||||||
{
|
{
|
||||||
free(langdir);
|
free(langdir);
|
||||||
langdir = str;
|
langdir = str;
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_piddir(char* str)
|
void set_piddir(char* str)
|
||||||
{
|
{
|
||||||
free(piddir);
|
free(piddir);
|
||||||
@ -33,7 +54,10 @@ char* get_libdir()
|
|||||||
void set_libdir(char* param)
|
void set_libdir(char* param)
|
||||||
{
|
{
|
||||||
if (libdir)
|
if (libdir)
|
||||||
|
{
|
||||||
free(libdir);
|
free(libdir);
|
||||||
|
}
|
||||||
|
|
||||||
libdir = param;
|
libdir = param;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@ -48,7 +72,10 @@ char* get_cachedir()
|
|||||||
void set_cachedir(char* param)
|
void set_cachedir(char* param)
|
||||||
{
|
{
|
||||||
if (cachedir)
|
if (cachedir)
|
||||||
|
{
|
||||||
free(cachedir);
|
free(cachedir);
|
||||||
|
}
|
||||||
|
|
||||||
cachedir = param;
|
cachedir = param;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -64,7 +91,10 @@ char* get_datadir()
|
|||||||
void set_datadir(char* param)
|
void set_datadir(char* param)
|
||||||
{
|
{
|
||||||
if (maxscaledatadir)
|
if (maxscaledatadir)
|
||||||
|
{
|
||||||
free(maxscaledatadir);
|
free(maxscaledatadir);
|
||||||
|
}
|
||||||
|
|
||||||
maxscaledatadir = param;
|
maxscaledatadir = param;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user