Skip to content

Commit

Permalink
Message.SetSessionID should use SessionID.IsSet(...) instead of ... !…
Browse files Browse the repository at this point in the history
…= SessionID.NOT_SET
  • Loading branch information
Andrey Kamyshanov committed Aug 28, 2014
1 parent 19dac28 commit af2d5be
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions QuickFIXn/Message/Message.cs
Original file line number Diff line number Diff line change
Expand Up @@ -710,14 +710,14 @@ public void SetSessionID(SessionID sessionID)
{
this.Header.SetField(new BeginString(sessionID.BeginString));
this.Header.SetField(new SenderCompID(sessionID.SenderCompID));
if (sessionID.SenderSubID != SessionID.NOT_SET)
if (SessionID.IsSet(sessionID.SenderSubID))
this.Header.SetField(new SenderSubID(sessionID.SenderSubID));
if (sessionID.SenderLocationID != SessionID.NOT_SET)
if (SessionID.IsSet(sessionID.SenderLocationID))
this.Header.SetField(new SenderLocationID(sessionID.SenderLocationID));
this.Header.SetField(new TargetCompID(sessionID.TargetCompID));
if (sessionID.TargetSubID != SessionID.NOT_SET)
if (SessionID.IsSet(sessionID.TargetSubID))
this.Header.SetField(new TargetSubID(sessionID.TargetSubID));
if (sessionID.TargetLocationID != SessionID.NOT_SET)
if (SessionID.IsSet(sessionID.TargetLocationID))
this.Header.SetField(new TargetLocationID(sessionID.TargetLocationID));
}

Expand Down

0 comments on commit af2d5be

Please sign in to comment.