--- a/libpurple/protocols/bonjour/bonjour.c Mon Dec 12 01:07:16 2022 -0600
+++ b/libpurple/protocols/bonjour/bonjour.c Mon Dec 12 04:23:17 2022 -0600
@@ -204,7 +204,7 @@
-bonjour_protocol_get_account_options(PurpleProtocol *protocol) {
+bonjour_protocol_get_account_options(G_GNUC_UNUSED PurpleProtocol *protocol) { PurpleAccountOption *option;
@@ -234,14 +234,15 @@
static PurpleBuddyIconSpec *
-bonjour_protocol_get_buddy_icon_spec(PurpleProtocol *protocol) {
+bonjour_protocol_get_buddy_icon_spec(G_GNUC_UNUSED PurpleProtocol *protocol) { return purple_buddy_icon_spec_new("png,gif,jpeg",
PURPLE_ICON_SCALE_DISPLAY);
-bonjour_send_im(PurpleProtocolIM *im, PurpleConnection *connection, PurpleMessage *msg)
+bonjour_send_im(G_GNUC_UNUSED PurpleProtocolIM *im, + PurpleConnection *connection, PurpleMessage *msg) BonjourData *bd = purple_connection_get_protocol_data(connection);
@@ -254,7 +255,7 @@
-bonjour_set_status(PurpleProtocolServer *protocol_server,
+bonjour_set_status(G_GNUC_UNUSED PurpleProtocolServer *protocol_server, PurpleAccount *account, PurpleStatus *status)
@@ -297,9 +298,11 @@
* if there is no add_buddy callback.
-bonjour_fake_add_buddy(PurpleProtocolServer *protocol_server,
- PurpleConnection *pc, PurpleBuddy *buddy,
- PurpleGroup *group, const gchar *message)
+bonjour_fake_add_buddy(G_GNUC_UNUSED PurpleProtocolServer *protocol_server, + G_GNUC_UNUSED PurpleConnection *connection, + G_GNUC_UNUSED PurpleGroup *group, + G_GNUC_UNUSED const gchar *message) purple_debug_error("bonjour", "Buddy '%s' manually added; removing. "
"Bonjour buddies must be discovered and not manually added.\n",
@@ -313,9 +316,10 @@
-bonjour_remove_buddy(PurpleProtocolServer *protocol_server,
- PurpleConnection *pc, PurpleBuddy *buddy,
+bonjour_remove_buddy(G_GNUC_UNUSED PurpleProtocolServer *protocol_server, + G_GNUC_UNUSED PurpleConnection *connection, + G_GNUC_UNUSED PurpleGroup *group) BonjourBuddy *bb = purple_buddy_get_protocol_data(buddy);
@@ -356,7 +360,7 @@
-bonjour_convo_closed(PurpleProtocolClient *client,
+bonjour_convo_closed(G_GNUC_UNUSED PurpleProtocolClient *client, PurpleConnection *connection, const char *who)
PurpleBuddy *buddy = purple_blist_find_buddy(purple_connection_get_account(connection), who);
@@ -376,8 +380,9 @@
-bonjour_set_buddy_icon(PurpleProtocolServer *protocol_server,
- PurpleConnection *conn, PurpleImage *img)
+bonjour_set_buddy_icon(G_GNUC_UNUSED PurpleProtocolServer *protocol_server, + PurpleConnection *conn, + G_GNUC_UNUSED PurpleImage *img) BonjourData *bd = purple_connection_get_protocol_data(conn);
bonjour_dns_sd_update_buddy_icon(bd->dns_sd_data);
@@ -385,7 +390,8 @@
-bonjour_status_text(PurpleProtocolClient *client, PurpleBuddy *buddy)
+bonjour_status_text(G_GNUC_UNUSED PurpleProtocolClient *client, PurplePresence *presence;
@@ -406,8 +412,9 @@
-bonjour_tooltip_text(PurpleProtocolClient *client, PurpleBuddy *buddy,
- PurpleNotifyUserInfo *user_info, gboolean full)
+bonjour_tooltip_text(G_GNUC_UNUSED PurpleProtocolClient *client, + PurpleBuddy *buddy, PurpleNotifyUserInfo *user_info, + G_GNUC_UNUSED gboolean full) PurplePresence *presence;
@@ -487,9 +494,9 @@
-bonjour_group_buddy(PurpleProtocolServer *protocol_server,
- PurpleConnection *connection, const gchar *who,
- const gchar *old_group, const gchar *new_group)
+bonjour_group_buddy(G_GNUC_UNUSED PurpleProtocolServer *protocol_server, + PurpleConnection *connection, const char *who, + G_GNUC_UNUSED const char *old_group, const char *new_group) PurpleBuddy *buddy = purple_blist_find_buddy(purple_connection_get_account(connection), who);
@@ -497,9 +504,9 @@
-bonjour_rename_group(PurpleProtocolServer *protocol_server,
- PurpleConnection *connection,
- const gchar *old_name, PurpleGroup *group,
+bonjour_rename_group(G_GNUC_UNUSED PurpleProtocolServer *protocol_server, + G_GNUC_UNUSED PurpleConnection *connection, + G_GNUC_UNUSED const char *old_name, PurpleGroup *group, @@ -510,7 +517,8 @@
-bonjour_can_receive_file(PurpleProtocolXfer *prplxfer, PurpleConnection *connection, const char *who)
+bonjour_can_receive_file(G_GNUC_UNUSED PurpleProtocolXfer *prplxfer, + PurpleConnection *connection, const char *who) PurpleBuddy *buddy = purple_blist_find_buddy(purple_connection_get_account(connection), who);
@@ -518,7 +526,8 @@
-bonjour_get_max_message_size(PurpleProtocolClient *client, PurpleConversation *conv)
+bonjour_get_max_message_size(G_GNUC_UNUSED PurpleProtocolClient *client, + G_GNUC_UNUSED PurpleConversation *conv) return -1; /* 5MB successfully tested. */
@@ -670,7 +679,7 @@
-bonjour_protocol_init(BonjourProtocol *self)
+bonjour_protocol_init(G_GNUC_UNUSED BonjourProtocol *self) @@ -755,7 +764,7 @@
static GPluginPluginInfo *
-bonjour_query(GError **error)
+bonjour_query(G_GNUC_UNUSED GError **error) return purple_plugin_info_new(
@@ -794,7 +803,8 @@
-bonjour_unload(GPluginPlugin *plugin, gboolean shutdown, GError **error)
+bonjour_unload(G_GNUC_UNUSED GPluginPlugin *plugin, + G_GNUC_UNUSED gboolean shutdown, GError **error) PurpleProtocolManager *manager = purple_protocol_manager_get_default();
--- a/libpurple/protocols/bonjour/bonjour_ft.c Mon Dec 12 01:07:16 2022 -0600
+++ b/libpurple/protocols/bonjour/bonjour_ft.c Mon Dec 12 04:23:17 2022 -0600
@@ -300,7 +300,8 @@
-bonjour_new_xfer(PurpleProtocolXfer *prplxfer, PurpleConnection *gc, const char *who)
+bonjour_new_xfer(G_GNUC_UNUSED PurpleProtocolXfer *prplxfer, + PurpleConnection *gc, const char *who) @@ -703,8 +704,9 @@
-bonjour_xfer_receive(PurpleConnection *pc, const char *id, const char *sid, const char *from,
- goffset filesize, const char *filename, int option)
+bonjour_xfer_receive(PurpleConnection *pc, const char *id, const char *sid, + const char *from, goffset filesize, const char *filename, + G_GNUC_UNUSED int option) @@ -865,7 +867,7 @@
-bonjour_sock5_incoming_cb(GSocketService *service,
+bonjour_sock5_incoming_cb(G_GNUC_UNUSED GSocketService *service, GSocketConnection *connection, GObject *source_object,
G_GNUC_UNUSED gpointer data)
@@ -1185,8 +1187,7 @@
-xep_xfer_class_finalize(XepXferClass *klass) {
+xep_xfer_class_finalize(G_GNUC_UNUSED XepXferClass *klass) { --- a/libpurple/protocols/bonjour/dns_sd_proxy.c Mon Dec 12 01:07:16 2022 -0600
+++ b/libpurple/protocols/bonjour/dns_sd_proxy.c Mon Dec 12 04:23:17 2022 -0600
@@ -56,24 +56,24 @@
- if ((_DNSServiceAddRecord = (void *) wpurple_find_and_loadproc("dnssd.dll", "DNSServiceAddRecord"))
- && (_DNSServiceBrowse = (void *) wpurple_find_and_loadproc("dnssd.dll", "DNSServiceBrowse"))
- && (_DNSServiceConstructFullName = (void *) wpurple_find_and_loadproc("dnssd.dll", "DNSServiceConstructFullName"))
- && (_DNSServiceGetAddrInfo = (void *) wpurple_find_and_loadproc("dnssd.dll", "DNSServiceGetAddrInfo"))
- && (_DNSServiceProcessResult = (void *) wpurple_find_and_loadproc("dnssd.dll", "DNSServiceProcessResult"))
- && (_DNSServiceQueryRecord = (void *) wpurple_find_and_loadproc("dnssd.dll", "DNSServiceQueryRecord"))
- && (_DNSServiceRefDeallocate = (void *) wpurple_find_and_loadproc("dnssd.dll", "DNSServiceRefDeallocate"))
- && (_DNSServiceRefSockFD = (void *) wpurple_find_and_loadproc("dnssd.dll", "DNSServiceRefSockFD"))
- && (_DNSServiceRegister = (void *) wpurple_find_and_loadproc("dnssd.dll", "DNSServiceRegister"))
- && (_DNSServiceResolve = (void *) wpurple_find_and_loadproc("dnssd.dll", "DNSServiceResolve"))
- && (_DNSServiceRemoveRecord = (void *) wpurple_find_and_loadproc("dnssd.dll", "DNSServiceRemoveRecord"))
- && (_DNSServiceUpdateRecord = (void *) wpurple_find_and_loadproc("dnssd.dll", "DNSServiceUpdateRecord"))
- && (_TXTRecordCreate = (void *) wpurple_find_and_loadproc("dnssd.dll", "TXTRecordCreate"))
- && (_TXTRecordDeallocate = (void *) wpurple_find_and_loadproc("dnssd.dll", "TXTRecordDeallocate"))
- && (_TXTRecordGetBytesPtr = (void *) wpurple_find_and_loadproc("dnssd.dll", "TXTRecordGetBytesPtr"))
- && (_TXTRecordGetLength = (void *) wpurple_find_and_loadproc("dnssd.dll", "TXTRecordGetLength"))
- && (_TXTRecordGetValuePtr = (void *) wpurple_find_and_loadproc("dnssd.dll", "TXTRecordGetValuePtr"))
- && (_TXTRecordSetValue = (void *) wpurple_find_and_loadproc("dnssd.dll", "TXTRecordSetValue"))) {
+ if ((_DNSServiceAddRecord = (gpointer)wpurple_find_and_loadproc("dnssd.dll", "DNSServiceAddRecord")) + && (_DNSServiceBrowse = (gpointer)wpurple_find_and_loadproc("dnssd.dll", "DNSServiceBrowse")) + && (_DNSServiceConstructFullName = (gpointer)wpurple_find_and_loadproc("dnssd.dll", "DNSServiceConstructFullName")) + && (_DNSServiceGetAddrInfo = (gpointer)wpurple_find_and_loadproc("dnssd.dll", "DNSServiceGetAddrInfo")) + && (_DNSServiceProcessResult = (gpointer)wpurple_find_and_loadproc("dnssd.dll", "DNSServiceProcessResult")) + && (_DNSServiceQueryRecord = (gpointer)wpurple_find_and_loadproc("dnssd.dll", "DNSServiceQueryRecord")) + && (_DNSServiceRefDeallocate = (gpointer)wpurple_find_and_loadproc("dnssd.dll", "DNSServiceRefDeallocate")) + && (_DNSServiceRefSockFD = (gpointer)wpurple_find_and_loadproc("dnssd.dll", "DNSServiceRefSockFD")) + && (_DNSServiceRegister = (gpointer)wpurple_find_and_loadproc("dnssd.dll", "DNSServiceRegister")) + && (_DNSServiceResolve = (gpointer)wpurple_find_and_loadproc("dnssd.dll", "DNSServiceResolve")) + && (_DNSServiceRemoveRecord = (gpointer)wpurple_find_and_loadproc("dnssd.dll", "DNSServiceRemoveRecord")) + && (_DNSServiceUpdateRecord = (gpointer)wpurple_find_and_loadproc("dnssd.dll", "DNSServiceUpdateRecord")) + && (_TXTRecordCreate = (gpointer)wpurple_find_and_loadproc("dnssd.dll", "TXTRecordCreate")) + && (_TXTRecordDeallocate = (gpointer)wpurple_find_and_loadproc("dnssd.dll", "TXTRecordDeallocate")) + && (_TXTRecordGetBytesPtr = (gpointer)wpurple_find_and_loadproc("dnssd.dll", "TXTRecordGetBytesPtr")) + && (_TXTRecordGetLength = (gpointer)wpurple_find_and_loadproc("dnssd.dll", "TXTRecordGetLength")) + && (_TXTRecordGetValuePtr = (gpointer)wpurple_find_and_loadproc("dnssd.dll", "TXTRecordGetValuePtr")) + && (_TXTRecordSetValue = (gpointer)wpurple_find_and_loadproc("dnssd.dll", "TXTRecordSetValue"))) { --- a/libpurple/protocols/bonjour/mdns_avahi.c Mon Dec 12 01:07:16 2022 -0600
+++ b/libpurple/protocols/bonjour/mdns_avahi.c Mon Dec 12 04:23:17 2022 -0600
@@ -102,11 +102,13 @@
-_resolver_callback(AvahiServiceResolver *r, AvahiIfIndex interface, AvahiProtocol protocol,
- AvahiResolverEvent event, const char *name, const char *type, const char *domain,
- const char *host_name, const AvahiAddress *a, uint16_t port, AvahiStringList *txt,
- AvahiLookupResultFlags flags, void *userdata) {
+_resolver_callback(AvahiServiceResolver *r, AvahiIfIndex interface, + AvahiProtocol protocol, AvahiResolverEvent event, + const char *name, const char *type, const char *domain, + G_GNUC_UNUSED const char *host_name, const AvahiAddress *a, + uint16_t port, AvahiStringList *txt, + G_GNUC_UNUSED AvahiLookupResultFlags flags, void *userdata) PurpleAccount *account = userdata;
@@ -235,10 +237,10 @@
_browser_callback(AvahiServiceBrowser *b, AvahiIfIndex interface,
- AvahiProtocol protocol, AvahiBrowserEvent event,
- const char *name, const char *type, const char *domain,
- AvahiLookupResultFlags flags, void *userdata) {
+ AvahiProtocol protocol, AvahiBrowserEvent event, + const char *name, const char *type, const char *domain, + G_GNUC_UNUSED AvahiLookupResultFlags flags, void *userdata) PurpleAccount *account = userdata;
@@ -364,9 +366,16 @@
-_buddy_icon_record_cb(AvahiRecordBrowser *b, AvahiIfIndex interface, AvahiProtocol protocol,
- AvahiBrowserEvent event, const char *name, uint16_t clazz, uint16_t type,
- const void *rdata, size_t size, AvahiLookupResultFlags flags, void *userdata) {
+_buddy_icon_record_cb(AvahiRecordBrowser *b, + G_GNUC_UNUSED AvahiIfIndex interface, + G_GNUC_UNUSED AvahiProtocol protocol, + AvahiBrowserEvent event, G_GNUC_UNUSED const char *name, + G_GNUC_UNUSED uint16_t clazz, + G_GNUC_UNUSED uint16_t type, + const void *rdata, size_t size, + G_GNUC_UNUSED AvahiLookupResultFlags flags, BonjourBuddy *buddy = userdata;
AvahiBuddyImplData *idata = buddy->mdns_impl_data;
--- a/libpurple/protocols/bonjour/mdns_dns_sd.c Mon Dec 12 01:07:16 2022 -0600
+++ b/libpurple/protocols/bonjour/mdns_dns_sd.c Mon Dec 12 04:23:17 2022 -0600
@@ -102,7 +102,9 @@
-_mdns_handle_event(gpointer data, gint source, PurpleInputCondition condition) {
+_mdns_handle_event(gpointer data, G_GNUC_UNUSED gint source, + G_GNUC_UNUSED PurpleInputCondition condition) DnsSDServiceRefHandlerData *srh = data;
DNSServiceErrorType errorCode = DNSServiceProcessResult(srh->sdRef);
if (errorCode != kDNSServiceErr_NoError) {
@@ -132,12 +134,15 @@
-_mdns_record_query_callback(DNSServiceRef DNSServiceRef, DNSServiceFlags flags,
- uint32_t interfaceIndex, DNSServiceErrorType errorCode, const char *fullname,
- uint16_t rrtype, uint16_t rrclass, uint16_t rdlen, const void *rdata,
- uint32_t ttl, void *context)
+_mdns_record_query_callback(G_GNUC_UNUSED DNSServiceRef DNSServiceRef, + G_GNUC_UNUSED uint32_t interfaceIndex, + DNSServiceErrorType errorCode, + G_GNUC_UNUSED const char *fullname, + uint16_t rrtype, G_GNUC_UNUSED uint16_t rrclass, + uint16_t rdlen, const void *rdata, + G_GNUC_UNUSED uint32_t ttl, void *context)
if (errorCode != kDNSServiceErr_NoError) {
purple_debug_error("bonjour", "record query - callback error (%d).\n", errorCode);
/* TODO: Probably should remove the buddy when this happens */
@@ -166,10 +171,13 @@
-_mdns_resolve_host_callback(DNSServiceRef sdRef, DNSServiceFlags flags,
- uint32_t interfaceIndex, DNSServiceErrorType errorCode,
- const char *hostname, const struct sockaddr *address,
- uint32_t ttl, void *context)
+_mdns_resolve_host_callback(G_GNUC_UNUSED DNSServiceRef sdRef, + G_GNUC_UNUSED DNSServiceFlags flags, + G_GNUC_UNUSED uint32_t interfaceIndex, + DNSServiceErrorType errorCode, + G_GNUC_UNUSED const char *hostname, + const struct sockaddr *address, + G_GNUC_UNUSED uint32_t ttl, void *context) ResolveCallbackArgs *args = (ResolveCallbackArgs*) context;
Win32BuddyImplData *idata = args->bb->mdns_impl_data;
@@ -262,8 +270,14 @@
-_mdns_service_resolve_callback(DNSServiceRef sdRef, DNSServiceFlags flags, uint32_t interfaceIndex, DNSServiceErrorType errorCode,
- const char *fullname, const char *hosttarget, uint16_t port, uint16_t txtLen, const unsigned char *txtRecord, void *context)
+_mdns_service_resolve_callback(G_GNUC_UNUSED DNSServiceRef sdRef, + G_GNUC_UNUSED DNSServiceFlags flags, + uint32_t interfaceIndex, + DNSServiceErrorType errorCode, + const char *fullname, const char *hosttarget, + uint16_t port, G_GNUC_UNUSED uint16_t txtLen, + G_GNUC_UNUSED const unsigned char *txtRecord, ResolveCallbackArgs *args = (ResolveCallbackArgs*) context;
Win32BuddyImplData *idata = args->bb->mdns_impl_data;
@@ -321,9 +335,14 @@
-_mdns_service_register_callback(DNSServiceRef sdRef, DNSServiceFlags flags, DNSServiceErrorType errorCode,
- const char *name, const char *regtype, const char *domain, void *context) {
+_mdns_service_register_callback(G_GNUC_UNUSED DNSServiceRef sdRef, + G_GNUC_UNUSED DNSServiceFlags flags, + DNSServiceErrorType errorCode, + G_GNUC_UNUSED const char *name, + G_GNUC_UNUSED const char *regtype, + G_GNUC_UNUSED const char *domain, + G_GNUC_UNUSED void *context) /* TODO: deal with collision */
if (errorCode != kDNSServiceErr_NoError)
purple_debug_error("bonjour", "service advertisement - callback error (%d).\n", errorCode);
@@ -332,8 +351,11 @@
-_mdns_service_browse_callback(DNSServiceRef sdRef, DNSServiceFlags flags, uint32_t interfaceIndex,
- DNSServiceErrorType errorCode, const char *serviceName, const char *regtype, const char *replyDomain, void *context)
+_mdns_service_browse_callback(G_GNUC_UNUSED DNSServiceRef sdRef, + DNSServiceFlags flags, uint32_t interfaceIndex, + DNSServiceErrorType errorCode, + const char *serviceName, const char *regtype, + const char *replyDomain, void *context) PurpleAccount *account = (PurpleAccount*)context;
--- a/libpurple/protocols/bonjour/meson.build Mon Dec 12 01:07:16 2022 -0600
+++ b/libpurple/protocols/bonjour/meson.build Mon Dec 12 04:23:17 2022 -0600
@@ -36,7 +36,9 @@
c_args : ['-DG_LOG_USE_STRUCTURED', '-DG_LOG_DOMAIN="Purple-Bonjour"'],
link_args : bonjour_link_args,
dependencies : [libxml, avahi, libpurple_dep, glib, ws2_32],
- install : true, install_dir : PURPLE_PLUGINDIR)
+ install_dir : PURPLE_PLUGINDIR, + override_options : ['c_std=c99', 'warning_level=2']) devenv.append('PURPLE_PLUGIN_PATH', meson.current_build_dir())
--- a/libpurple/protocols/bonjour/parser.c Mon Dec 12 01:07:16 2022 -0600
+++ b/libpurple/protocols/bonjour/parser.c Mon Dec 12 04:23:17 2022 -0600
@@ -47,9 +47,14 @@
bonjour_parser_element_start_libxml(void *user_data,
- const xmlChar *element_name, const xmlChar *prefix, const xmlChar *namespace,
- int nb_namespaces, const xmlChar **namespaces,
- int nb_attributes, int nb_defaulted, const xmlChar **attributes)
+ const xmlChar *element_name, + const xmlChar *namespace, + G_GNUC_UNUSED int nb_namespaces, + G_GNUC_UNUSED const xmlChar **namespaces, + G_GNUC_UNUSED int nb_defaulted, + const xmlChar **attributes) BonjourXMPPConversation *bconv = user_data;
@@ -110,7 +115,8 @@
bonjour_parser_element_end_libxml(void *user_data, const xmlChar *element_name,
- const xmlChar *prefix, const xmlChar *namespace)
+ G_GNUC_UNUSED const xmlChar *prefix, + G_GNUC_UNUSED const xmlChar *namespace) BonjourXMPPConversation *bconv = user_data;
--- a/libpurple/protocols/bonjour/xmpp.c Mon Dec 12 01:07:16 2022 -0600
+++ b/libpurple/protocols/bonjour/xmpp.c Mon Dec 12 04:23:17 2022 -0600
@@ -352,7 +352,7 @@
+ if ((gsize)ret < len) { /* Don't interfere with the stream starting */
if (bconv->sent_stream_start == FULLY_SENT &&
bconv->recv_stream_start && bconv->tx_handler == 0) {
@@ -361,7 +361,7 @@
G_POLLABLE_OUTPUT_STREAM(bconv->output),
g_source_set_callback(source,
- (GSourceFunc)_send_data_write_cb,
+ G_SOURCE_FUNC(_send_data_write_cb), bconv->tx_handler = g_source_attach(source, NULL);
@@ -513,7 +513,7 @@
/* This is EXTREMELY unlikely to happen */
- if (G_UNLIKELY(ret < len)) {
+ if (G_UNLIKELY((gsize)ret < len)) { char *tmp = g_strdup(ss->msg + ret);
@@ -597,7 +597,7 @@
/* This is unlikely to happen */
+ if ((gsize)ret < len) { struct _stream_start_data *ss = g_new(struct _stream_start_data, 1);
ss->msg = g_strdup(stream_start + ret);
@@ -606,7 +606,7 @@
source = g_pollable_output_stream_create_source(
G_POLLABLE_OUTPUT_STREAM(bconv->output),
- g_source_set_callback(source, (GSourceFunc)_start_stream, bconv,
+ g_source_set_callback(source, G_SOURCE_FUNC(_start_stream), bconv, bconv->tx_handler = g_source_attach(source, NULL);
@@ -678,7 +678,7 @@
GSource *source = g_pollable_output_stream_create_source(
G_POLLABLE_OUTPUT_STREAM(bconv->output),
- g_source_set_callback(source, (GSourceFunc)_send_data_write_cb,
+ g_source_set_callback(source, G_SOURCE_FUNC(_send_data_write_cb), bconv->tx_handler = g_source_attach(source, NULL);
@@ -692,8 +692,9 @@
-_server_socket_handler(GSocketService *service, GSocketConnection *connection,
- GObject *source_object, gpointer data)
+_server_socket_handler(G_GNUC_UNUSED GSocketService *service, + GSocketConnection *connection, + G_GNUC_UNUSED GObject *source_object, gpointer data) BonjourXMPP *jdata = data;
GSocketAddress *their_addr; /* connector's address information */
@@ -748,7 +749,7 @@
g_io_stream_get_output_stream(G_IO_STREAM(bconv->socket)));
source = g_pollable_input_stream_create_source(
G_POLLABLE_INPUT_STREAM(bconv->input), bconv->cancellable);
- g_source_set_callback(source, (GSourceFunc)_client_socket_handler,
+ g_source_set_callback(source, G_SOURCE_FUNC(_client_socket_handler), bconv->rx_handler = g_source_attach(source, NULL);
@@ -913,7 +914,7 @@
rx_source = g_pollable_input_stream_create_source(
G_POLLABLE_INPUT_STREAM(bb->conversation->input),
bb->conversation->cancellable);
- g_source_set_callback(rx_source, (GSourceFunc)_client_socket_handler,
+ g_source_set_callback(rx_source, G_SOURCE_FUNC(_client_socket_handler), bb->conversation->rx_handler = g_source_attach(rx_source, NULL);
g_source_unref(rx_source);