Port gnttinyurl plugin to libsoup3

Review Request #1961 — Created Oct. 25, 2022 and submitted

Information

pidgin/pidgin
default

Reviewers

This covers both adding the SoupMessage to an existing callback data structure, and using SoupMessage as the callback data with "real" callback data attached to it.

Compiled against libsoup2 and libsoup3.

Summary ID
Port gnttinyurl plugin to libsoup3
6707bf9fe6cb0c476533e52a3a9b2910917fbed8
Description From Last Updated

If we don't finish, the result just sits in limbo no?

grimgrim

"cancel it" perhaps?

grimgrim

where does g_cancellable_cancel come from?

grimgrim
grim
  1. 
      
  2. finch/plugins/gnttinyurl/gnttinyurl.c (Diff revision 1)
     
     

    If we don't finish, the result just sits in limbo no?

    1. libsoup uses GTask for async results, and g_task_propagate_pointer "steals" the result from the task. That means if you don't call finish, the task still owns it and will free the result with the GDestroyNotify that was given to g_task_return_pointer. So I don't think we need to call finish always.

    2. Right right, this coming back to me now. The issue I was remembering was when we were trying to early fail in the _async method.

  3. finch/plugins/gnttinyurl/gnttinyurl.c (Diff revision 1)
     
     

    "cancel it" perhaps?

  4. finch/plugins/gnttinyurl/gnttinyurl.c (Diff revision 1)
     
     

    where does g_cancellable_cancel come from?

  5. 
      
QuLogic
grim
  1. Ship It!
  2. Great work, thanks!!

  3. 
      
grim
Review request changed

Status: Closed (submitted)

Loading...