X-Git-Url: http://git.dolda2000.com/gitweb/?a=blobdiff_plain;f=daemon%2Ffnet-adc.c;h=98d760fc5bdffb805b30f7fccb094cc57fd8b369;hb=302a260054ea38d3cb97be6d1a3010082c09265d;hp=ecbffe35d69409afa3edbfde437d9168f3afb172;hpb=cab0b442977697b876127cda082b1262ece2714b;p=doldaconnect.git diff --git a/daemon/fnet-adc.c b/daemon/fnet-adc.c index ecbffe3..98d760f 100644 --- a/daemon/fnet-adc.c +++ b/daemon/fnet-adc.c @@ -1,6 +1,6 @@ /* * Dolda Connect - Modular multiuser Direct Connect-style client - * Copyright (C) 2004 Fredrik Tolf (fredrik@dolda2000.com) + * Copyright (C) 2004 Fredrik Tolf * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -192,7 +192,14 @@ static void freeqcmd(struct qcmd *qcmd) } #define ADC_CMDFN(name) static void name(struct fnetnode *fn, wchar_t *command, wchar_t *sender, int argc, wchar_t **argv) -#define ADC_CMDCOM struct socket *sk = fn->sk; struct adchub *hub = fn->data; +#ifdef __GNUC__ +#define UNUSED __attribute__ ((unused)) +#else +#define UNUSED +#endif +#define ADC_CMDCOM \ + struct socket *sk UNUSED = fn->sk; \ + struct adchub *hub UNUSED = fn->data; ADC_CMDFN(cmd_sup) { @@ -469,7 +476,15 @@ static void terminate(void) } static struct configvar myvars[] = { + /** Specifies a specific UDP port to use for ADC search + * results. If left unspecified, a port is allocated + * dynamically. Useful for NAT routers (see also the + * net.visibleipv4 address for those cases). */ {CONF_VAR_INT, "udpport", {.num = 0}}, + /** Specifies a specific TCP port to use for ADC peer + * connections. If left unspecified, a port is allocated + * dynamically. Useful for NAT routers (see also the + * net.visibleipv4 address for those cases). */ {CONF_VAR_INT, "tcpport", {.num = 0}}, {CONF_VAR_END} };