From 9be7d29f1b8ab55fd377beeb9a5d31a4b32bf416 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Fri, 17 Apr 2020 10:05:09 +0200 Subject: Don't expose upload_processes That's actually not good practise. Realized this when checking for multiple symbol definition in issue mentioned below. Regards https://github.com/profanity-im/profanity/issues/1314 --- src/ui/window_list.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'src/ui/window_list.c') diff --git a/src/ui/window_list.c b/src/ui/window_list.c index dd065c25..09b165e2 100644 --- a/src/ui/window_list.c +++ b/src/ui/window_list.c @@ -50,6 +50,7 @@ #include "ui/window_list.h" #include "xmpp/xmpp.h" #include "xmpp/roster_list.h" +#include "tools/http_upload.h" static GHashTable *windows; static int current; @@ -519,15 +520,7 @@ wins_close_by_num(int i) ProfWin *window = wins_get_by_num(i); if (window) { // cancel upload proccesses of this window - GSList *upload_process = upload_processes; - while (upload_process) { - HTTPUpload *upload = upload_process->data; - if (upload->window == window) { - upload->cancel = 1; - break; - } - upload_process = g_slist_next(upload_process); - } + http_upload_cancel_processes(window); switch (window->type) { case WIN_CHAT: -- cgit 1.4.1-2-gfad0