[Freeciv-tickets] [freeciv] #44158: broadcast_city_info has apparently illogical code

Back to archive index
OSDN Ticket System norep****@osdn*****
Sat Apr 2 11:42:07 JST 2022


#44158: broadcast_city_info has apparently illogical code

  Open Date: 2022-03-22 14:06
Last Update: 2022-04-02 11:42

URL for this Ticket:
    https://osdn.net//projects/freeciv/ticket/44158
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=44158

---------------------------------------------------------------------

Last Changes/Comment on this Ticket:
2022-04-02 11:42 Updated by: lexxie9952

Comment:

Hello. Hopefully I'm not annoying on this. But I am finding trouble with what you said. 
The current FCW code compared to current upstream code looks like this:
[https://gyazo.com/b51dd247004aaa9c235b14e77ea2476b
To me it seems the only difference in this is the powner was changed to pplayer in the right spots.
So far, so good?
Correct me where I go wrong, please!
This is how it compares to your patch to the upstream code:
https://gyazo.com/bbe2968357dc102b8dcccc8bb8107430
If there is any action I should take please let me know. I am just confused because it was buggy and now I got it working with that change.

---------------------------------------------------------------------
Ticket Status:

      Reporter: lexxie9952
         Owner: cazfi
          Type: Bugs
        Status: Open [Owner assigned]
      Priority: 5 - Medium
     MileStone: 3.0.1
     Component: Server
      Severity: 5 - Medium
    Resolution: Accepted
---------------------------------------------------------------------

Ticket details:

in freeciv/freeciv master branch, citytools.c, broadcast_city_info
Line 2182, https://github.com/freeciv/freeciv/blob/5bcfc01b1cd0a721764ff64b8706a037826294d1/server/citytools.c#L2182
We iterate all players to see if they can see inside the city, presumably so they can "see" the internal city data. But each time they qualify to see it, we make that info accessible to the city **owner.**  So, for every pplayer who can see inside the city, we repeatedly and redundantly allow the city owner access to see inside their city. Not the pplayer who is supposedly able to see.
This ticket submitted by request... copy-paste of cazfi response:
"Can you open a ticket about that? The code makes no sense, while it's
less clear what exactly is wrong with it (seems to me that it has
actually multiple problems, but need to confirm that with more time)"
NOTE: for the purposes FCW was able to achieve, changing powner to pplayer worked. If there are other issues when all this gets rewritten, please send me a courtesy notification. Thanks!

-- 
Ticket information of Freeciv project
Freeciv Project is hosted on OSDN

Project URL: https://osdn.net/projects/freeciv/
OSDN: https://osdn.net

URL for this Ticket:
    https://osdn.net/projects/freeciv/ticket/44158
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=44158



More information about the Freeciv-tickets mailing list
Back to archive index