patchFreeciv - Patches: patch #4296, Remove incorrect assertion for...

 
 
Show feedback again

patch #4296: Remove incorrect assertion for non-null nationality

Submitted by:  Guillaume Melquiond <silene>
Submitted on:  Thu Nov 7 21:35:40 2013  
 
Category: clientPriority: 5 - Normal
Status: DonePrivacy: Public
Assigned to: Marko Lindqvist <cazfi>Open/Closed: Closed
Planned Release: 2.5.0, 2.6.0Contains string changes: None

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri Nov 22 01:07:46 2013, SVN revision 23763:

Removed assertion about unit having nationality set. That's not always true client side.

Patch by Guillaume Melquiond

See patch #4296

(Browse SVN revision 23763)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Fri Nov 22 01:07:40 2013, SVN revision 23762:

Removed assertion about unit having nationality set. That's not always true client side.

Patch by Guillaume Melquiond

See patch #4296

(Browse SVN revision 23762)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Fri Nov 8 03:05:38 2013, comment #2:

Sorry for the ambiguous sentence. Server-side, nationality is indeed always non-null. What I meant is that some units received by the clients from the server have their nationality set to null, e.g. enemy units.

Guillaume Melquiond <silene>
Fri Nov 8 00:41:32 2013, comment #1:

> several places of the server code purposely sets the
> nationality to null


Where that happens? I think units should always have nationality set in server side.

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Thu Nov 7 21:35:40 2013, original submission:

unit.c:unit_nationality checks that the nationality of the unit is non-null before returning it. This assertion is incorrect since several places of the server code purposely sets the nationality to null. (And the client code expects the result of the function to be possibly null and test for it anyway.) For example, when a diplomat investigates a city, there is a flood of assertion failures in the console, since the nationality of enemy units is always hidden from the clients.

Guillaume Melquiond <silene>

 

(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #19333:  nationality.patch added by silene (371B - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by cazfi (Posted a comment)
  • -unavailable- added by silene (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Error: not logged in

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri Nov 22 01:08:01 2013cazfiStatusReady For Test=>Done
      Open/ClosedOpen=>Closed
    Fri Nov 8 05:59:02 2013cazfiStatusNone=>Ready For Test
      Assigned toNone=>cazfi
      Planned Release=>2.5.0, 2.6.0
    Thu Nov 7 21:35:40 2013sileneAttached File-=>Added nationality.patch, #19333
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup