Lines Matching refs:writer
99 struct Curl_cwriter *writer = data->req.writer_stack; in cl_reset_writer() local
100 while(writer) { in cl_reset_writer()
101 data->req.writer_stack = writer->next; in cl_reset_writer()
102 writer->cwt->do_close(data, writer); in cl_reset_writer()
103 free(writer); in cl_reset_writer()
104 writer = data->req.writer_stack; in cl_reset_writer()
178 struct Curl_cwriter *writer, int type, in Curl_cwriter_write() argument
181 if(!writer) in Curl_cwriter_write()
183 return writer->cwt->do_write(data, writer, type, buf, nbytes); in Curl_cwriter_write()
187 struct Curl_cwriter *writer) in Curl_cwriter_def_init() argument
190 (void)writer; in Curl_cwriter_def_init()
195 struct Curl_cwriter *writer, int type, in Curl_cwriter_def_write() argument
198 return Curl_cwriter_write(data, writer->next, type, buf, nbytes); in Curl_cwriter_def_write()
202 struct Curl_cwriter *writer) in Curl_cwriter_def_close() argument
205 (void) writer; in Curl_cwriter_def_close()
237 struct Curl_cwriter *writer, int type, in cw_download_write() argument
240 struct cw_download_ctx *ctx = writer->ctx; in cw_download_write()
253 result = Curl_cwriter_write(data, writer->next, type, buf, nbytes); in cw_download_write()
311 result = Curl_cwriter_write(data, writer->next, type, buf, nwrite); in cw_download_write()
361 struct Curl_cwriter *writer, int type, in cw_raw_write() argument
367 return Curl_cwriter_write(data, writer->next, type, buf, nbytes); in cw_raw_write()
385 struct Curl_cwriter *writer = NULL; in Curl_cwriter_create() local
394 writer = (struct Curl_cwriter *)p; in Curl_cwriter_create()
395 writer->cwt = cwt; in Curl_cwriter_create()
396 writer->ctx = p; in Curl_cwriter_create()
397 writer->phase = phase; in Curl_cwriter_create()
398 result = cwt->do_init(data, writer); in Curl_cwriter_create()
401 *pwriter = result ? NULL : writer; in Curl_cwriter_create()
403 free(writer); in Curl_cwriter_create()
408 struct Curl_cwriter *writer) in Curl_cwriter_free() argument
410 if(writer) { in Curl_cwriter_free()
411 writer->cwt->do_close(data, writer); in Curl_cwriter_free()
412 free(writer); in Curl_cwriter_free()
430 struct Curl_cwriter *writer; in do_init_writer_stack() local
439 result = Curl_cwriter_create(&writer, data, &cw_download, CURL_CW_PROTOCOL); in do_init_writer_stack()
442 result = Curl_cwriter_add(data, writer); in do_init_writer_stack()
444 Curl_cwriter_free(data, writer); in do_init_writer_stack()
447 result = Curl_cwriter_create(&writer, data, &cw_raw, CURL_CW_RAW); in do_init_writer_stack()
450 result = Curl_cwriter_add(data, writer); in do_init_writer_stack()
452 Curl_cwriter_free(data, writer); in do_init_writer_stack()
458 struct Curl_cwriter *writer) in Curl_cwriter_add() argument
471 while(*anchor && (*anchor)->phase < writer->phase) in Curl_cwriter_add()
473 writer->next = *anchor; in Curl_cwriter_add()
474 *anchor = writer; in Curl_cwriter_add()
481 struct Curl_cwriter *writer; in Curl_cwriter_get_by_name() local
482 for(writer = data->req.writer_stack; writer; writer = writer->next) { in Curl_cwriter_get_by_name()
483 if(!strcmp(name, writer->cwt->name)) in Curl_cwriter_get_by_name()
484 return writer; in Curl_cwriter_get_by_name()
492 struct Curl_cwriter *writer; in Curl_cwriter_get_by_type() local
493 for(writer = data->req.writer_stack; writer; writer = writer->next) { in Curl_cwriter_get_by_type()
494 if(writer->cwt == cwt) in Curl_cwriter_get_by_type()
495 return writer; in Curl_cwriter_get_by_type()