X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=daemon%2Ftransfer.c;h=0bf759ed440b4146e99b461bcda357952e534378;hb=0ecdd176e7eba9fb46f4b3228f8b109a7cf20ab4;hp=cf636e4261cf464b7f11a3efc95f61edb48f5ac5;hpb=734dc54e7df608612f5743b210280ac1629107a7;p=doldaconnect.git diff --git a/daemon/transfer.c b/daemon/transfer.c index cf636e4..0bf759e 100644 --- a/daemon/transfer.c +++ b/daemon/transfer.c @@ -155,6 +155,18 @@ struct transfer *finddownload(wchar_t *peerid) return(transfer); } +struct transfer *hasupload(struct fnet *fnet, wchar_t *peerid) +{ + struct transfer *transfer; + + for(transfer = transfers; transfer != NULL; transfer = transfer->next) + { + if((transfer->dir == TRNSD_UP) && (transfer->fnet == fnet) && !wcscmp(transfer->peerid, peerid)) + break; + } + return(transfer); +} + struct transfer *newupload(struct fnetnode *fn, struct fnet *fnet, wchar_t *nickid, struct transferiface *iface, void *data) { struct transfer *transfer; @@ -786,10 +798,23 @@ static int run(void) static struct configvar myvars[] = { + /** The maximum number of simultaneously permitted uploads. A + * common hub rule is that you will need at least as many slots as + * the number of hubs to which you are connected. */ {CONF_VAR_INT, "slots", {.num = 3}}, + /** The TOS value to use for upload connections (see the TOS + * VALUES section). */ {CONF_VAR_INT, "ultos", {.num = SOCK_TOS_MAXTP}}, + /** The TOS value to use for download connections (see the TOS + * VALUES section). */ {CONF_VAR_INT, "dltos", {.num = SOCK_TOS_MAXTP}}, + /** The name of the filter script (see the FILES section for + * lookup information). */ {CONF_VAR_STRING, "filter", {.str = L"dc-filter"}}, + /** If true, only one upload is allowed per remote peer. This + * option is still experimental, so it is recommended to leave it + * off. */ + {CONF_VAR_BOOL, "ulquota", {.num = 0}}, {CONF_VAR_END} };