Skip to content

implement timeouts from ws-discovery

Harald Sitter requested to merge work/smbtimeout into master

previously we had a global timeout in smb_browse but that was eventually removed to not break SMBC discovery, which is also used for listing directories. this left WSD without any timeout system when no WSD hosts are on the network because the internal timeout tracking would only start after the first response.

instead implement the actually specified timeout mechanics of WSD.

  • /Probe may only be Matched within MATCH_TIMEOUT (m_probeMatchTimer = global timeout tracker now)
  • /Resolve may only be Matched within MATCH_TIMEOUT (encapsulated inside new WSDResolver)
  • PBSD may only be answered within HTTP_TIMEOUT (couldn't find a specified timeout so I'm guessing one would ordinarily use a default http timeout, since we only do a single cheap query I'm using a more opinionate timeout though)

MATCH_TIMEOUT is derived form the DPWS spec rather than the underlying ws-discovery because it has more lenient timing and is generally a bit more assertive with requirements.

BUG: 436574

Merge request reports