fix(fls): Gnutella's peer limit is random in Java, not a default
PeerToPeerAnwendung's constructor rolls its peer limit (3, 4 or 5). The
getter defaults measured it once each run — 4, then 5 — and c48d15d
committed 5 as a default. GetterDefaults now constructs every class 64
times and writes a value that varies as {"random": [...]}; the decoder
answers a reference to it as unresolved, and the topology layer reports
a peer limit the file does not set as null.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -129,8 +129,11 @@ export interface FlsApplication {
|
||||
recursiveResolutionEnabled?: boolean;
|
||||
/** WebServer: serve by host name (Java's useVHost). */
|
||||
useVirtualHosts?: boolean;
|
||||
/** PeerToPeerAnwendung: how many peers it keeps (Java's maxTeilnehmerZahl). */
|
||||
maxPeers?: number;
|
||||
/**
|
||||
* PeerToPeerAnwendung: how many peers it keeps (Java's maxTeilnehmerZahl);
|
||||
* null when the file has none — Java's constructor rolls 3, 4 or 5.
|
||||
*/
|
||||
maxPeers?: number | null;
|
||||
/** Firewall: the personal firewall. */
|
||||
firewall?: FlsFirewall;
|
||||
/** The application's JavaBean, for the e-mail layer. */
|
||||
@@ -269,7 +272,8 @@ function applications(map: JavaValue | undefined, warn: Warn): FlsApplication[]
|
||||
entry.useVirtualHosts = boolean(at('useVHost'), measured('useVHost') === true, 'WebServer useVHost', warn);
|
||||
break;
|
||||
case 'filius.software.dateiaustausch.PeerToPeerAnwendung':
|
||||
entry.maxPeers = integer(at('maxTeilnehmerZahl'), Number(measured('maxTeilnehmerZahl')), 'Gnutella peers', warn);
|
||||
entry.maxPeers =
|
||||
at('maxTeilnehmerZahl') === undefined ? null : integer(at('maxTeilnehmerZahl'), 0, 'Gnutella peers', warn);
|
||||
break;
|
||||
case 'filius.software.firewall.Firewall':
|
||||
entry.firewall = firewallOf([application], true, warn);
|
||||
|
||||
Reference in New Issue
Block a user