A ComId that is sent with an PD Pull request is always sent to the same ip address. In the function tlp_request() the following code is used:
/* Look for former request element */
pReqElement = trdp_queueFindComId(appHandle->pSndQueue, comId);
If the ComId is in the queue the destination ip address is not set. Due to that the Pull request is always sent to the same ip address.
The problem could be solved if the function trdp_queueFindPubAddr() would be used and not trdp_queueFindComId().
Due to that issue it is not possible to send a Pull request with the same ComID to different destinations.
Thanks for bringing up this issue!
It seems to be a little bit more complicated, unfortunately!
Digging deeper, the proposed solution still shows a fundamental problem:
The PD request uses the same send queue as any published PD - looking for an existing comId in that queue and reusing it will overwrite its properties (msg type, addresses, flags...). Currently there should not be a publisher with the same comId.
Using trdp_queueFindPubAddr() to find an existing entry will do the trick, but add another entry to the queue...
For now I will implement your proposal, but I'll post another ticket to eventually remove already sent PD requests from the queue.