source: protocols/purple/bpurple.h @ 01d56c0

Last change on this file since 01d56c0 was 01d56c0, checked in by dequis <dx@…>, at 2016-10-08T06:39:05Z

purple: Fix handling of empty, immediate roomlist results

Two issues here:

  1. SIPE called in_progress(FALSE) immediately (which decreases refcount),

before purple_roomlist_get_list() could return (which would normally
increase refcount). The first refcount decrease steals it from the prpl,
and bad things happen.

Added an initialized flag to only do that decrease after it was
increased first. This is similar to how pidgin sets a 'dialog' attribute
after the purple_roomlist_get_list() call, and skips the unref if it's
not set.

  1. The code assumed that NULL return value means room listing not

supported. That's not quite true, so now it checks in the prpl info to
see if roomlist_get_list is defined.

Also, made purple_roomlist_data more private.

  • Property mode set to 100644
File size: 262 bytes
Line 
1#ifndef BPURPLE_H
2# define BPURPLE_H
3
4#include <purple.h>
5#include <glib.h>
6
7#define PURPLE_REQUEST_HANDLE "purple_request"
8
9struct purple_data
10{
11    PurpleAccount *account;
12
13    GHashTable *input_requests;
14    guint next_request_id;
15};
16
17#endif /* !BPURPLE_H */
Note: See TracBrowser for help on using the repository browser.