Description

A user pointed out a possible mistaken use of the && operator instead of the || operator in an if statement in source code. In the FOnlineSessionNull::GetResolvedConnectString() function in OnlineSessionInterfaceNull.cpp, a default beacon listen port value is set but never used if no port was actually specified.

Steps to Reproduce
  1. Open OnlineSessionInterfaceNull.cpp.
  2. Locate the function FOnlineSessionNull::GetResolvedConnectString(const class FOnlineSessionSearchResult& SearchResult, FName PortType, FString& ConnectInfo)
    • Line 739 in CL 2955029 in Dev-Main.

RESULT:
Line 749 reads if (SearchResult.Session.SessionSettings.Get(SETTING_BEACONPORT, BeaconListenPort) && BeaconListenPort > 0).

EXPECTED:
The user suggested that the || operator would be better used here so that the default value for BeaconListenPort is used if a value has not been specifically set in the SETTING_BEACONPORT key.

Have Comments or More Details?

Head over to the existing AnswerHub thread and let us know what's up.

0
Login to Vote

Won't Fix
ComponentNetworking
Affects Versions4.6.14.84.13
CreatedDec 31, 2014
ResolvedJan 12, 2017
UpdatedJan 23, 2017