Skip to content

Fixes on Related Files search function + display TCP/UDP flags for Servers in Release build - #154

Merged
got3nks merged 3 commits into
amule-org:masterfrom
danim7:related-search
Jun 14, 2026
Merged

Fixes on Related Files search function + display TCP/UDP flags for Servers in Release build#154
got3nks merged 3 commits into
amule-org:masterfrom
danim7:related-search

Conversation

@danim7

@danim7 danim7 commented Jun 14, 2026

Copy link
Copy Markdown

Summary

Fixes on the Related Files search function.

The RelatedFiles search function is a special search function provided by lugdunum servers that will search for files shared by multiple clients that also share a specific file (like Amazon's "client who buy this item, they usually buy these other items too"). It can be launched by right-clicking on a search result and clicking on the "Related Search (ed2k, local)" option. This search capability must be advertised as a TCP flag by the server, and can only be run on a Local search, not on a Global search.

References:
eMuleAI / SearchResultsWnd.cpp
https://forum.emule-project.net/index.php?showtopic=79371&st=60&p=564252&#entry564252
https://lugdunum.shortypower.org/kiten.html

The current aMule implementation had a few issues:

  • Pre-fix: It launched the search as the type currently selected in the choice item. Post-fix: the Search type is set to Local. Also, a guard has been added to check we are currently connected to a server advertising that capability, if not, a pop-up message is displayed to the user.
  • Pre-fix: It only worked for the first selected file --> Post-fix: it works for multiple hashes too

Display TCP/UDP Flags in Server window for Release build

During the development of this function, I relied on the TCP flags to test against servers supporting or not supporting that feature. Currently, new server implementations are being deployed in the wild, and we can expect this trend to continue as the main server software (lugdunum) has been unmantained for a long time. Therefore, having these flags may be useful to better known where are we connecting to, or ask users for more details when debugging cases.

The current aMule implementation did:

  • For amule monolithic: Pre-fix: TCP/UDP flags are only created in Debug build. Post-fix: They are created in all builds, but they are hidden by default on non-Debug build. So they become now available when required for power-users, testing or debugging issues from users. Almost 0 perf impact. The labels become translatable strings.
  • For amulegui: Pre-fix: TCP/UDP flags created in Debug mode in the constructor, but not in the refresh function. Since these fields are not wired in the EC protocol, just be consistent and remove them completely.

Test plan

  • Related File search in server supporting it. Tested in eMule Security, largest server at the moment. For the record, the TCP flag to check is "r". Works as expected.
  • Related File search in server not supporting it: Tested in Hydra ed2kNET SERVER, which doesn't advertise the function. We get a popup when trying to do it.
  • Related File search when not connected to ed2k: Disconnect ed2k network, use Kad, try to perform a related search. We get a popup when trying to do it.
  • Related File search in Local search type only: Confirmed, the right choice is selected automatically. For the sake of testing, I double check with wireshark how the server behaved pre-fix when receiving a related-search via UDP: they just answer with only the file associated to that hash. If then I connected to that server and perform the search over TCP, they answer with the full result test for the same query.
  • Related File search with multiple hashes: Confirmed by selecting 2 files, the right search pattern is sent to the ser.ver
  • TCP/UDP flags available in all builds for amule. Hide/Unhide/Resize/Restart. Confirmed, the columns are available in both Debug and Release builds. The size and visible status persist after restart.
  • TCP/UDP flags removed from amulegui. Tested Debug/Release build, no presence of these columns.

@got3nks got3nks left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution. A few items to address before merge:

  1. The new translatable strings (_("TCP Flags"), _("UDP Flags"), and the wxMessageBox text in OnRelatedSearch) need the .pot template + .po files regenerated; otherwise the "App catalogs in sync with source" CI check will fail (and currently does).

  2. Mixed tabs/spaces in the new wxMessageBox block at the end of OnRelatedSearch — continuation lines use 29 spaces of indent and the trailing return; uses 16, while the rest of the file is tabs. Re-indent with tabs.

  3. The moved doxygen block in MuleListCtrl.h uses 8-space indent under /**; the original location used tabs. Same content, just realign with tabs.

  4. Test plan boxes are all unchecked — confirm the six scenarios were actually exercised, especially the "server not supporting it" popup path and persistence of the TCP/UDP-flag column widths via LoadSettings/SaveSettings across restart?

danim7 added 3 commits June 14, 2026 15:15
Also, make the TCP and UDP Flags Server columns available in Release
builds, but not displayed by default
Fix display of TCP/UDP flags in Server window
@danim7
danim7 marked this pull request as ready for review June 14, 2026 13:49
@danim7
danim7 requested a review from got3nks June 14, 2026 13:52
@got3nks
got3nks merged commit e3504df into amule-org:master Jun 14, 2026
9 checks passed
@danim7
danim7 deleted the related-search branch June 14, 2026 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants