about summary refs log tree commit diff stats
path: root/src/ui/window_list.c
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2020-04-17 10:05:09 +0200
committerMichael Vetter <jubalh@iodoru.org>2020-04-17 10:05:09 +0200
commit9be7d29f1b8ab55fd377beeb9a5d31a4b32bf416 (patch)
treed975e1a7e8c00ff31350766d619da2aa03cba188 /src/ui/window_list.c
parent00fc0e2e8d02d830e44b3c28973661d8e5411b7b (diff)
downloadprofani-tty-9be7d29f1b8ab55fd377beeb9a5d31a4b32bf416.tar.gz
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
Diffstat (limited to 'src/ui/window_list.c')
-rw-r--r--src/ui/window_list.c11
1 files changed, 2 insertions, 9 deletions
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: