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
This commit is contained in:
Michael Vetter
2020-04-17 10:05:09 +02:00
parent 00fc0e2e8d
commit 9be7d29f1b
4 changed files with 27 additions and 12 deletions

View File

@@ -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: