pidgin/pidgin

Replace purple_input_remove by g_source_remove

19 months ago, Elliott Sales de Andrade
5c21747ff7dc
Parents 9dc5d28fca99
Children 4a51008d3f64
Replace purple_input_remove by g_source_remove

It is a one line wrapper for it.

Testing Done:
Compiled.

Reviewed at https://reviews.imfreedom.org/r/1865/
--- a/ChangeLog.API Thu Sep 29 21:44:01 2022 -0500
+++ b/ChangeLog.API Thu Sep 29 23:43:08 2022 -0500
@@ -473,6 +473,7 @@
* purple_idle_get_ui_ops
* purple_idle_set_ui_ops
* purple_idle_ui_ops_get_type
+ * purple_input_remove
* purple_ip_address_is_valid, purple_ipv4_address_is_valid, and
purple_ipv6_address_is_valid. Use g_hostname_is_ip_address()
or #GInetAddress instead.
--- a/libpurple/eventloop.c Thu Sep 29 21:44:01 2022 -0500
+++ b/libpurple/eventloop.c Thu Sep 29 23:43:08 2022 -0500
@@ -83,12 +83,6 @@
return closure->result;
}
-gboolean
-purple_input_remove(guint tag)
-{
- return g_source_remove(tag);
-}
-
int
purple_input_pipe(int pipefd[2])
{
--- a/libpurple/eventloop.h Thu Sep 29 21:44:01 2022 -0500
+++ b/libpurple/eventloop.h Thu Sep 29 23:43:08 2022 -0500
@@ -79,16 +79,6 @@
PurpleInputFunction func, gpointer user_data);
/**
- * purple_input_remove:
- * @handle: The handle of the input handler. Note that this is the return
- * value from purple_input_add(), <emphasis>not</emphasis> the
- * file descriptor.
- *
- * Removes an input handler.
- */
-gboolean purple_input_remove(guint handle);
-
-/**
* purple_input_pipe:
* @pipefd: Array used to return file descriptors for both ends of pipe.
*
--- a/libpurple/protocols/bonjour/mdns_dns_sd.c Thu Sep 29 21:44:01 2022 -0500
+++ b/libpurple/protocols/bonjour/mdns_dns_sd.c Thu Sep 29 23:43:08 2022 -0500
@@ -91,7 +91,7 @@
static void
_cleanup_resolver_data(Win32SvcResolverData *rd) {
if (rd->txt_query != NULL) {
- purple_input_remove(rd->txt_query->input_handler);
+ g_source_remove(rd->txt_query->input_handler);
DNSServiceRefDeallocate(rd->txt_query->sdRef);
g_free(rd->txt_query);
}
@@ -157,7 +157,7 @@
bonjour_buddy_got_buddy_icon(bb, rdata, rdlen);
/* We've got what we need; stop listening */
- purple_input_remove(idata->null_query->input_handler);
+ g_source_remove(idata->null_query->input_handler);
DNSServiceRefDeallocate(idata->null_query->sdRef);
g_free(idata->null_query);
idata->null_query = NULL;
@@ -176,7 +176,7 @@
gboolean delete_buddy = FALSE;
PurpleBuddy *pb = NULL;
- purple_input_remove(args->resolver_query->input_handler);
+ g_source_remove(args->resolver_query->input_handler);
DNSServiceRefDeallocate(args->resolver_query->sdRef);
g_free(args->resolver_query);
args->resolver_query = NULL;
@@ -269,7 +269,7 @@
Win32BuddyImplData *idata = args->bb->mdns_impl_data;
/* remove the input fd and destroy the service ref */
- purple_input_remove(args->resolver_query->input_handler);
+ g_source_remove(args->resolver_query->input_handler);
DNSServiceRefDeallocate(args->resolver_query->sdRef);
if (errorCode != kDNSServiceErr_NoError)
@@ -578,13 +578,13 @@
return;
if (idata->presence_query != NULL) {
- purple_input_remove(idata->presence_query->input_handler);
+ g_source_remove(idata->presence_query->input_handler);
DNSServiceRefDeallocate(idata->presence_query->sdRef);
g_free(idata->presence_query);
}
if (idata->browser_query != NULL) {
- purple_input_remove(idata->browser_query->input_handler);
+ g_source_remove(idata->browser_query->input_handler);
DNSServiceRefDeallocate(idata->browser_query->sdRef);
g_free(idata->browser_query);
}
@@ -644,7 +644,7 @@
}
if (idata->null_query != NULL) {
- purple_input_remove(idata->null_query->input_handler);
+ g_source_remove(idata->null_query->input_handler);
DNSServiceRefDeallocate(idata->null_query->sdRef);
g_free(idata->null_query);
}
@@ -664,7 +664,7 @@
/* Cancel any existing query */
if (idata->null_query != NULL) {
- purple_input_remove(idata->null_query->input_handler);
+ g_source_remove(idata->null_query->input_handler);
DNSServiceRefDeallocate(idata->null_query->sdRef);
g_free(idata->null_query);
idata->null_query = NULL;
--- a/libpurple/protocols/gg/gg.c Thu Sep 29 21:44:01 2022 -0500
+++ b/libpurple/protocols/gg/gg.c Thu Sep 29 23:43:08 2022 -0500
@@ -356,7 +356,7 @@
gg_debug_event(ev->type));
}
- purple_input_remove(info->inpa);
+ g_source_remove(info->inpa);
info->inpa = purple_input_add(info->session->fd,
ggp_tcpsocket_inputcond_gg_to_purple(info->session->check),
ggp_callback_recv, gc);
@@ -504,7 +504,7 @@
purple_debug_info("gg", "login_handler: session: check = %d; state = %d;\n",
info->session->check, info->session->state);
- purple_input_remove(info->inpa);
+ g_source_remove(info->inpa);
info->inpa = 0;
/** XXX I think that this shouldn't be done if ev->type is GG_EVENT_CONN_FAILED or GG_EVENT_CONN_SUCCESS -datallah */
@@ -526,7 +526,7 @@
info->session->connect_host);
ggp_servconn_add_server(info->session->
connect_host);
- purple_input_remove(info->inpa);
+ g_source_remove(info->inpa);
info->inpa = purple_input_add(info->session->fd,
PURPLE_INPUT_READ,
ggp_callback_recv, gc);
@@ -539,7 +539,7 @@
break;
case GG_EVENT_CONN_FAILED:
if (info->inpa > 0) {
- purple_input_remove(info->inpa);
+ g_source_remove(info->inpa);
info->inpa = 0;
}
purple_debug_info("gg", "Connection failure: %d\n",
@@ -934,7 +934,7 @@
ggp_edisc_cleanup(gc);
if (info->inpa > 0)
- purple_input_remove(info->inpa);
+ g_source_remove(info->inpa);
g_free(info->imtoken);
if (info->http) {
--- a/libpurple/protocols/gg/libgaduw.c Thu Sep 29 21:44:01 2022 -0500
+++ b/libpurple/protocols/gg/libgaduw.c Thu Sep 29 23:43:08 2022 -0500
@@ -173,7 +173,7 @@
}
if (req->h->state != GG_STATE_DONE) {
- purple_input_remove(req->inpa);
+ g_source_remove(req->inpa);
req->inpa = ggp_purplew_http_input_add(req->h,
ggp_libgaduw_http_handler, req);
return;
@@ -206,7 +206,7 @@
ggp_purplew_request_processing_done(req->processing);
req->processing = NULL;
}
- purple_input_remove(req->inpa);
+ g_source_remove(req->inpa);
req->cb(req->h, success, req->cancelled, req->user_data);
req->h->destroy(req->h);
g_free(req);
--- a/libpurple/protocols/irc/dcc_send.c Thu Sep 29 21:44:01 2022 -0500
+++ b/libpurple/protocols/irc/dcc_send.c Thu Sep 29 23:43:08 2022 -0500
@@ -168,7 +168,7 @@
return;
else if (len <= 0) {
/* XXX: Shouldn't this be canceling the transfer? */
- purple_input_remove(xd->inpa);
+ g_source_remove(xd->inpa);
xd->inpa = 0;
return;
}
@@ -198,7 +198,7 @@
}
if ((goffset)acked >= purple_xfer_get_size(xfer)) {
- purple_input_remove(xd->inpa);
+ g_source_remove(xd->inpa);
xd->inpa = 0;
purple_xfer_set_completed(xfer, TRUE);
purple_xfer_end(xfer);
@@ -381,7 +381,7 @@
}
g_clear_object(&xfer->service);
if(xfer->inpa > 0) {
- purple_input_remove(xfer->inpa);
+ g_source_remove(xfer->inpa);
}
g_clear_object(&xfer->conn);
--- a/libpurple/protocols/sametime/sametime.c Thu Sep 29 21:44:01 2022 -0500
+++ b/libpurple/protocols/sametime/sametime.c Thu Sep 29 23:43:08 2022 -0500
@@ -389,7 +389,7 @@
if (pd->stream) {
if (pd->inpa) {
- purple_input_remove(pd->inpa);
+ g_source_remove(pd->inpa);
pd->inpa = 0;
}
@@ -3634,7 +3634,7 @@
/* stop watching the socket */
if(pd->inpa) {
- purple_input_remove(pd->inpa);
+ g_source_remove(pd->inpa);
pd->inpa = 0;
}
--- a/libpurple/protocols/silc/silc.c Thu Sep 29 21:44:01 2022 -0500
+++ b/libpurple/protocols/silc/silc.c Thu Sep 29 23:43:08 2022 -0500
@@ -203,7 +203,7 @@
silc_dlist_start(sg->tasks);
while ((ptask = silc_dlist_get(sg->tasks)))
if (ptask->fd == fd) {
- purple_input_remove(ptask->tag);
+ g_source_remove(ptask->tag);
break;
}
@@ -240,7 +240,7 @@
silc_dlist_start(sg->tasks);
while ((ptask = silc_dlist_get(sg->tasks)))
if (ptask->fd == fd) {
- purple_input_remove(ptask->tag);
+ g_source_remove(ptask->tag);
silc_dlist_del(sg->tasks, ptask);
silc_free(ptask);
break;
@@ -736,7 +736,7 @@
silc_dlist_start(sg->tasks);
while ((task = silc_dlist_get(sg->tasks))) {
- purple_input_remove(task->tag);
+ g_source_remove(task->tag);
silc_free(task);
}
silc_dlist_uninit(sg->tasks);
--- a/libpurple/xfer.c Thu Sep 29 21:44:01 2022 -0500
+++ b/libpurple/xfer.c Thu Sep 29 23:43:08 2022 -0500
@@ -1373,7 +1373,7 @@
if it needs to for some odd reason. */
if (s == 0) {
if (priv->watcher) {
- purple_input_remove(priv->watcher);
+ g_source_remove(priv->watcher);
purple_xfer_set_watcher(xfer, 0);
}
return;
@@ -1399,7 +1399,7 @@
* sets back up this watcher.
*/
if (priv->watcher != 0) {
- purple_input_remove(priv->watcher);
+ g_source_remove(priv->watcher);
purple_xfer_set_watcher(xfer, 0);
}
@@ -1492,7 +1492,7 @@
if (0 == (priv->ready & PURPLE_XFER_READY_UI)) {
priv->ready |= PURPLE_XFER_READY_PROTOCOL;
- purple_input_remove(priv->watcher);
+ g_source_remove(priv->watcher);
purple_xfer_set_watcher(xfer, 0);
purple_debug_misc("xfer", "Protocol is ready on ft %p, waiting for UI\n", xfer);
@@ -1730,7 +1730,7 @@
}
if (priv->watcher != 0) {
- purple_input_remove(priv->watcher);
+ g_source_remove(priv->watcher);
purple_xfer_set_watcher(xfer, 0);
}
@@ -1807,7 +1807,7 @@
}
if (priv->watcher != 0) {
- purple_input_remove(priv->watcher);
+ g_source_remove(priv->watcher);
purple_xfer_set_watcher(xfer, 0);
}
@@ -1871,7 +1871,7 @@
}
if (priv->watcher != 0) {
- purple_input_remove(priv->watcher);
+ g_source_remove(priv->watcher);
purple_xfer_set_watcher(xfer, 0);
}