summaryrefslogtreecommitdiff
path: root/ndb/src/cw/cpcd
diff options
context:
space:
mode:
authorunknown <joreland@mysql.com>2005-06-10 10:28:09 +0200
committerunknown <joreland@mysql.com>2005-06-10 10:28:09 +0200
commit6bb5d56de87f0c724e89ce5f8eb968e9d7053387 (patch)
tree6851781e487a9f978a5226f739025a33286cbb3f /ndb/src/cw/cpcd
parente91c52d03c3187fba1031b9b391671d201dea81c (diff)
parentf0f1b1c16e75a04c0efa93520f00942ca30a52d6 (diff)
downloadmariadb-git-6bb5d56de87f0c724e89ce5f8eb968e9d7053387.tar.gz
merge
Diffstat (limited to 'ndb/src/cw/cpcd')
-rw-r--r--ndb/src/cw/cpcd/main.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/ndb/src/cw/cpcd/main.cpp b/ndb/src/cw/cpcd/main.cpp
index 9bbd5e484d4..c320f07ef04 100644
--- a/ndb/src/cw/cpcd/main.cpp
+++ b/ndb/src/cw/cpcd/main.cpp
@@ -32,10 +32,9 @@
#include "common.hpp"
static const char *work_dir = CPCD_DEFAULT_WORK_DIR;
-static short unsigned int port;
+static int unsigned port;
static int use_syslog;
static const char *logfile = NULL;
-static const char *config_file = CPCD_DEFAULT_CONFIG_FILE;
static const char *user = 0;
static struct my_option my_long_options[] =
@@ -55,9 +54,6 @@ static struct my_option my_long_options[] =
{ "debug", 'D', "Enable debug mode",
(gptr*) &debug, (gptr*) &debug, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
- { "config", 'c', "Config file",
- (gptr*) &config_file, (gptr*) &config_file, 0,
- GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
{ "user", 'u', "Run as user",
(gptr*) &user, (gptr*) &user, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
@@ -142,7 +138,8 @@ int main(int argc, char** argv){
SocketServer * ss = new SocketServer();
CPCDAPIService * serv = new CPCDAPIService(cpcd);
- if(!ss->setup(serv, &port)){
+ unsigned short real_port= port; // correct type
+ if(!ss->setup(serv, &real_port)){
logger.critical("Cannot setup server: %s", strerror(errno));
sleep(1);
delete ss;