mirror of
https://github.com/irssi/irssi.git
synced 2024-11-03 04:27:19 -05:00
Remove dcc_queue_add_passive, use instead another argument in dcc_queue_add to initialize rec->passive.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4407 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
b9cf14359a
commit
7484c8b373
@ -110,7 +110,7 @@ void dcc_queue_free(int queue)
|
||||
*/
|
||||
|
||||
void dcc_queue_add(int queue, int mode, const char *nick, const char *fname,
|
||||
const char *servertag, CHAT_DCC_REC *chat)
|
||||
const char *servertag, CHAT_DCC_REC *chat, int passive)
|
||||
{
|
||||
DCC_QUEUE_REC *rec;
|
||||
GSList **qlist;
|
||||
@ -122,31 +122,7 @@ void dcc_queue_add(int queue, int mode, const char *nick, const char *fname,
|
||||
rec->servertag = g_strdup(servertag);
|
||||
rec->nick = g_strdup(nick);
|
||||
rec->file = g_strdup(fname);
|
||||
rec->passive = FALSE;
|
||||
|
||||
qlist = (GSList **) &g_ptr_array_index(queuelist, queue);
|
||||
if (mode == DCC_QUEUE_PREPEND)
|
||||
*qlist = g_slist_insert(*qlist, rec, 1);
|
||||
else
|
||||
*qlist = g_slist_append(*qlist, rec);
|
||||
}
|
||||
|
||||
/* Same as above but adds a passive DCC to the queue */
|
||||
void dcc_queue_add_passive(int queue, int mode, const char *nick,
|
||||
const char *fname, const char *servertag,
|
||||
CHAT_DCC_REC *chat)
|
||||
{
|
||||
DCC_QUEUE_REC *rec;
|
||||
GSList **qlist;
|
||||
|
||||
g_assert(queue >= 0 && queue < queuelist->len);
|
||||
|
||||
rec = g_new0(DCC_QUEUE_REC, 1);
|
||||
rec->chat = chat;
|
||||
rec->servertag = g_strdup(servertag);
|
||||
rec->nick = g_strdup(nick);
|
||||
rec->file = g_strdup(fname);
|
||||
rec->passive = TRUE;
|
||||
rec->passive = passive;
|
||||
|
||||
qlist = (GSList **) &g_ptr_array_index(queuelist, queue);
|
||||
if (mode == DCC_QUEUE_PREPEND)
|
||||
|
@ -28,10 +28,7 @@ int dcc_queue_old(const char *nick, const char *servertag);
|
||||
|
||||
/* adds nick/fname/servertag triplet into queue */
|
||||
void dcc_queue_add(int queue, int mode, const char *nick, const char *fname,
|
||||
const char *servertag, CHAT_DCC_REC *chat);
|
||||
void dcc_queue_add_passive(int queue, int mode, const char *nick,
|
||||
const char *fname, const char *servertag,
|
||||
CHAT_DCC_REC *chat);
|
||||
const char *servertag, CHAT_DCC_REC *chat, int passive);
|
||||
|
||||
int dcc_queue_remove_head(int queue);
|
||||
|
||||
|
@ -149,12 +149,8 @@ static void dcc_send_add(const char *servertag, CHAT_DCC_REC *chat,
|
||||
}
|
||||
}
|
||||
|
||||
if (!passive)
|
||||
dcc_queue_add(queue, add_mode, nick,
|
||||
fname, servertag, chat);
|
||||
else
|
||||
dcc_queue_add_passive(queue, add_mode, nick,
|
||||
fname, servertag, chat);
|
||||
dcc_queue_add(queue, add_mode, nick,
|
||||
fname, servertag, chat, passive);
|
||||
files++;
|
||||
g_free(fname);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user