← Back to team overview

linuxdcpp-team team mailing list archive

[Bug 602290] [NEW] UCMD from File>Open Own List is sent to first hub, not correct hub

 

Public bug reported:

A user command of type CT8 shows up in the context menu on files when
you select File>Open Own List. However, when this command is selected,
there is no guarantee the message will be sent to the hub from which the
UCMD originated. If you are connected to multiple hubs, then the one
which appears first in the title of the directory listing window is the
one to which the UCMD will be sent.

This has been tested by using Wireshark. To reproduce, open two or more
hubs, one of which sends a UCMD of type CT8. Then, open your file list
and select the user command. Close the file list and all hubs, then
reopen the hubs in a different order, reopen your file list, and select
the user command again.

I believe you can tell this is going to happen most easily when you have
a different user name per hub. If you open your file list the root of
your directory tree is your user name on the first hub.

The DirectoryListing Frame was created with the user set to HintedUser(ClientManager::getInstance()->getMe(), Util::emptyString) i.e. no URL is set. ClientManager::userCommand() uses this hint to call ClientManager::findOnlineUser(), which in turn tries ClientManager::findOnlineUser_hint(). The hintUrl is empty, so down at the end of ClientManager::findOnlineUser() the result is:
	// ok, hub not private, return a random user that matches the given CID but not the hint.
	return p.first->second;
Thus, the 'random' user is simply the user identity on the first hub to which the user connected.

** Affects: dcplusplus
     Importance: Undecided
         Status: New

-- 
UCMD from File>Open Own List is sent to first hub, not correct hub
https://bugs.launchpad.net/bugs/602290
You received this bug notification because you are a member of
Dcplusplus-team, which is subscribed to DC++.

Status in DC++: New

Bug description:
A user command of type CT8 shows up in the context menu on files when you select File>Open Own List. However, when this command is selected, there is no guarantee the message will be sent to the hub from which the UCMD originated. If you are connected to multiple hubs, then the one which appears first in the title of the directory listing window is the one to which the UCMD will be sent.

This has been tested by using Wireshark. To reproduce, open two or more hubs, one of which sends a UCMD of type CT8. Then, open your file list and select the user command. Close the file list and all hubs, then reopen the hubs in a different order, reopen your file list, and select the user command again.

I believe you can tell this is going to happen most easily when you have a different user name per hub. If you open your file list the root of your directory tree is your user name on the first hub.

The DirectoryListing Frame was created with the user set to HintedUser(ClientManager::getInstance()->getMe(), Util::emptyString) i.e. no URL is set. ClientManager::userCommand() uses this hint to call ClientManager::findOnlineUser(), which in turn tries ClientManager::findOnlineUser_hint(). The hintUrl is empty, so down at the end of ClientManager::findOnlineUser() the result is:
	// ok, hub not private, return a random user that matches the given CID but not the hint.
	return p.first->second;
Thus, the 'random' user is simply the user identity on the first hub to which the user connected.





Follow ups

References