~ubuntu-branches/ubuntu/oneiric/irssi/oneiric

« back to all changes in this revision

Viewing changes to src/irc/dcc/dcc-queue.c

  • Committer: Bazaar Package Importer
  • Author(s): Christian Bjälevik
  • Date: 2007-04-28 02:52:01 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070428025201-2c4swxnpn4wr7fpg
Tags: 0.8.11-0ubuntu1
* New upstream release:
  - http://www.irssi.org/news/ChangeLog
* debian/{control,compat}:
  - Bump Standards.
* debian/patches/00list:
  - Disable 05upgrade-check-binary.patch, applied upstream.
  - Disable 08doublefree.patch, applied upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
110
110
*/
111
111
 
112
112
void dcc_queue_add(int queue, int mode, const char *nick, const char *fname,
113
 
                   const char *servertag, CHAT_DCC_REC *chat)
114
 
{
115
 
        DCC_QUEUE_REC *rec;
116
 
        GSList **qlist;
117
 
 
118
 
        g_assert(queue >= 0 && queue < queuelist->len);
119
 
 
120
 
        rec = g_new0(DCC_QUEUE_REC, 1);
121
 
        rec->chat = chat;
122
 
        rec->servertag = g_strdup(servertag);
123
 
        rec->nick = g_strdup(nick);
124
 
        rec->file = g_strdup(fname);
125
 
        rec->passive = FALSE;
126
 
 
127
 
        qlist = (GSList **) &g_ptr_array_index(queuelist, queue);
128
 
        if (mode == DCC_QUEUE_PREPEND)
129
 
                *qlist = g_slist_insert(*qlist, rec, 1);
130
 
        else
131
 
                *qlist = g_slist_append(*qlist, rec);
132
 
}
133
 
 
134
 
/* Same as above but adds a passive DCC to the queue */
135
 
void dcc_queue_add_passive(int queue, int mode, const char *nick,
136
 
                           const char *fname, const char *servertag,
137
 
                           CHAT_DCC_REC *chat)
138
 
{
139
 
        DCC_QUEUE_REC *rec;
140
 
        GSList **qlist;
141
 
 
142
 
        g_assert(queue >= 0 && queue < queuelist->len);
143
 
 
144
 
        rec = g_new0(DCC_QUEUE_REC, 1);
145
 
        rec->chat = chat;
146
 
        rec->servertag = g_strdup(servertag);
147
 
        rec->nick = g_strdup(nick);
148
 
        rec->file = g_strdup(fname);
149
 
        rec->passive = TRUE;
 
113
                   const char *servertag, CHAT_DCC_REC *chat, int passive)
 
114
{
 
115
        DCC_QUEUE_REC *rec;
 
116
        GSList **qlist;
 
117
 
 
118
        g_assert(queue >= 0 && queue < queuelist->len);
 
119
 
 
120
        rec = g_new0(DCC_QUEUE_REC, 1);
 
121
        rec->chat = chat;
 
122
        rec->servertag = g_strdup(servertag);
 
123
        rec->nick = g_strdup(nick);
 
124
        rec->file = g_strdup(fname);
 
125
        rec->passive = passive;
150
126
 
151
127
        qlist = (GSList **) &g_ptr_array_index(queuelist, queue);
152
128
        if (mode == DCC_QUEUE_PREPEND)