Menu

#475 Update to newer curl API

None
closed
None
5
2026-06-03
2026-05-20
No

On my debian trixie and ubuntu 24 boxes, I get a lot of warnings about crossfire-server using depricated APIs for curl when compiling socket/metaserver.cpp

Here's a quick fix updating to the new, recommended API. The "new" API is available in libcurl from version 7.56.0 from October 4 2017.

1 Attachments

Discussion

  • Kevin Zheng

    Kevin Zheng - 2026-05-20
    • status: open --> analyzed
    • assigned_to: Kevin Zheng
    • Group: -->
     
  • Kevin Zheng

    Kevin Zheng - 2026-05-20

    This patch does not build. It contains pieces from built in websockets, which is not yet merged. Please verify that submitted patches build when applied to master.

    What is the purpose of the change in metaserver2_writer? Why cast to int only to return a size_t? This is not how you solve the problem with a printf string.

     
  • Sebastian Andersson

    Sorry, I developed it and tested on master, but then created the formatted git patch on my other server and missed I had already added those four lines there.

    The "%.s" format takes an int as the field width, not a size_t, hence the cast, but one can of course just cast it when it is used as a parameter instead. I've done that in the updated patch.

     
  • Kevin Zheng

    Kevin Zheng - 2026-05-21
     
  • Kevin Zheng

    Kevin Zheng - 2026-05-21

    Thanks! I committed many changes in a067aa0b0 based on this patch. Please go ahead and give it a whirl to make sure everything is working.

     
  • Sebastian Andersson

    Nice!

    It works fine with the EU metaserver. I didn't get any input/output bytes, but that is most likely a problem with my websocket implementation as the other integers are handled the same and they work fine.

     
  • Kevin Zheng

    Kevin Zheng - 2026-06-03
    • status: analyzed --> closed
     
  • Kevin Zheng

    Kevin Zheng - 2026-06-03

    Seems to be working.

     

Log in to post a comment.

Monday.com Logo