Browse Source

Add command line parameter to set passthrough mode

master
Con Kolivas 11 years ago
parent
commit
c371f9da91
  1. 8
      src/ckpool.c
  2. 3
      src/ckpool.h

8
src/ckpool.c

@ -1107,6 +1107,7 @@ static struct option long_options[] = {
{"killold", no_argument, 0, 'k'},
{"loglevel", required_argument, 0, 'l'},
{"name", required_argument, 0, 'n'},
{"passthrough", no_argument, 0, 'P'},
{"proxy", no_argument, 0, 'p'},
{"ckdb-sockdir",required_argument, 0, 'S'},
{"sockdir", required_argument, 0, 's'},
@ -1179,7 +1180,14 @@ int main(int argc, char **argv)
case 'n':
ckp.name = optarg;
break;
case 'P':
if (ckp.proxy)
quit(1, "Cannot set both proxy and passthrough mode");
ckp.passthrough = true;
break;
case 'p':
if (ckp.passthrough)
quit(1, "Cannot set both passthrough and proxy mode");
ckp.proxy = true;
break;
case 'S':

3
src/ckpool.h

@ -127,6 +127,9 @@ struct ckpool_instance {
pthread_t pth_listener;
pthread_t pth_watchdog;
/* Are we running in passthrough mode */
bool passthrough;
/* Are we running as a proxy */
bool proxy;

Loading…
Cancel
Save