Lines Matching refs:ctrans

163 client_transaction_read_more(struct client_transaction *ctrans)
165 struct istream *payload = ctrans->payload;
172 ctrans->path);
180 ctrans->path, (int)psize);
185 (ctrans->file, &fdata, &fsize)) > 0 && pleft > 0) {
191 ctrans->path, payload->v_offset,
192 ctrans->file->v_offset);
194 i_stream_skip(ctrans->file, fsize);
198 if (ret < 0 && ctrans->file->stream_errno != 0) {
201 i_stream_get_error(ctrans->file));
210 ctrans->path);
216 (void)i_stream_read(ctrans->file);
221 } if (i_stream_have_bytes_left(ctrans->file)) {
222 if (i_stream_read_more(ctrans->file, &fdata, &fsize) <= 0)
232 ctrans->path);
237 ctrans->payload = NULL;
238 i_stream_unref(&ctrans->file);
241 smtp_server_reply_all(ctrans->data_cmd, 250, "2.0.0", "OK");
246 client_transaction_handle_payload(struct client_transaction *ctrans,
249 struct smtp_server_transaction *trans = ctrans->trans;
252 ctrans->path = p_strdup(trans->pool, path);
264 ctrans->payload = data_input;
265 i_assert(ctrans->payload != NULL);
267 ctrans->file = i_stream_create_base64_encoder(fstream, 80, TRUE),
270 (void)client_transaction_read_more(ctrans);
280 struct client_transaction *ctrans;
283 ctrans = p_new(pool, struct client_transaction, 1);
284 ctrans->client = client;
285 ctrans->trans = trans;
286 ctrans->data_cmd = data_cmd;
288 return ctrans;
294 struct client_transaction *ctrans = *_ctrans;
298 i_stream_unref(&ctrans->payload);
299 i_stream_unref(&ctrans->file);
306 struct client_transaction *ctrans =
308 client_transaction_deinit(&ctrans);
332 struct client_transaction *ctrans;
340 ctrans = client_transaction_init(client, cmd, trans);
342 (ctrans, fpath, data_input);
343 trans->context = ctrans;
352 struct client_transaction *ctrans =
358 ctrans->data_cmd = cmd;
360 return client_transaction_read_more(ctrans);