Note that transfer compression is still supported -- it will simply be
hidden from the $Supports announcements. Buggy clients may thus still
request it.
static void sendsupports(struct dcpeer *peer)
{
static void sendsupports(struct dcpeer *peer)
{
qstr(peer->sk, "$Supports MiniSlots XmlBZList ADCGet TTHL TTHF GetZBlock ZLIG |");
qstr(peer->sk, "$Supports MiniSlots XmlBZList ADCGet TTHL TTHF GetZBlock ZLIG |");
- else
- qstr(peer->sk, "$Supports MiniSlots XmlBZList ADCGet TTHL TTHF GetZBlock ZLIG|");
+ } else {
+ qstr(peer->sk, "$Supports MiniSlots XmlBZList ADCGet TTHL TTHF");
+ if(!confgetint("dc", "hidedeflate"))
+ qstr(peer->sk, " GetZBlock ZLIG");
+ qstr(peer->sk, "|");
+ }
}
static void requestfile(struct dcpeer *peer)
}
static void requestfile(struct dcpeer *peer)
*(p++) = 0;
if(hub->extended)
{
*(p++) = 0;
if(hub->extended)
{
qstrf(sk, "$Supports UserCommand NoGetINFO NoHello UserIP2 TTHSearch GetZBlock |");
qstrf(sk, "$Supports UserCommand NoGetINFO NoHello UserIP2 TTHSearch GetZBlock |");
- else
- qstrf(sk, "$Supports UserCommand NoGetINFO NoHello UserIP2 TTHSearch GetZBlock|");
+ } else {
+ qstrf(sk, "$Supports UserCommand NoGetINFO NoHello UserIP2 TTHSearch");
+ if(!confgetint("dc", "hidedeflate"))
+ qstr(sk, " GetZBlock");
+ qstr(sk, "|");
+ }
}
key = dcmakekey(args);
qstrf(sk, "$Key %s|", key);
}
key = dcmakekey(args);
qstrf(sk, "$Key %s|", key);
* unknown commands it receives, and their arguments, to
* /tmp/dc-unimpl. */
{CONF_VAR_BOOL, "logunimpl", {.num = 0}},
* unknown commands it receives, and their arguments, to
* /tmp/dc-unimpl. */
{CONF_VAR_BOOL, "logunimpl", {.num = 0}},
+ /** If set to true, doldacond will hide its support for deflate
+ * compression of transfers from other clients, so that they will
+ * not request compressed uploads. Compressed transfers may
+ * consume a non-trivial amount of CPU time on slower machines. */
+ {CONF_VAR_BOOL, "hidedeflate", {.num = 0}},