Lines Matching refs:rdc
254 list_directory (struct ResponseDataContext *rdc, in list_directory() argument
277 if (rdc->off + 1024 > rdc->buf_len) in list_directory()
281 if ( (2 * rdc->buf_len + 1024) < rdc->buf_len) in list_directory()
283 rdc->buf_len = 2 * rdc->buf_len + 1024; in list_directory()
284 if (NULL == (r = realloc (rdc->buf, rdc->buf_len))) in list_directory()
286 rdc->buf = r; in list_directory()
288 rdc->off += snprintf (&rdc->buf[rdc->off], in list_directory()
289 rdc->buf_len - rdc->off, in list_directory()
307 struct ResponseDataContext rdc; in update_directory() local
315 rdc.buf_len = initial_allocation; in update_directory()
316 if (NULL == (rdc.buf = malloc (rdc.buf_len))) in update_directory()
321 rdc.off = snprintf (rdc.buf, rdc.buf_len, in update_directory()
333 rdc.off += snprintf (&rdc.buf[rdc.off], rdc.buf_len - rdc.off, in update_directory()
349 rdc.off += snprintf (&rdc.buf[rdc.off], rdc.buf_len - rdc.off, in update_directory()
353 if (MHD_NO == list_directory (&rdc, dir_name)) in update_directory()
355 free (rdc.buf); in update_directory()
364 rdc.off += snprintf (&rdc.buf[rdc.off], rdc.buf_len - rdc.off, in update_directory()
367 initial_allocation = rdc.buf_len; /* remember for next time */ in update_directory()
368 response = MHD_create_response_from_buffer (rdc.off, in update_directory()
369 rdc.buf, in update_directory()