Lines Matching refs:rdc
255 list_directory (struct ResponseDataContext *rdc, in list_directory() argument
278 if (rdc->off + 1024 > rdc->buf_len) in list_directory()
282 if ( (2 * rdc->buf_len + 1024) < rdc->buf_len) in list_directory()
284 rdc->buf_len = 2 * rdc->buf_len + 1024; in list_directory()
285 if (NULL == (r = realloc (rdc->buf, rdc->buf_len))) in list_directory()
287 rdc->buf = r; in list_directory()
289 rdc->off += snprintf (&rdc->buf[rdc->off], in list_directory()
290 rdc->buf_len - rdc->off, in list_directory()
308 struct ResponseDataContext rdc; in update_directory() local
316 rdc.buf_len = initial_allocation; in update_directory()
317 if (NULL == (rdc.buf = malloc (rdc.buf_len))) in update_directory()
322 rdc.off = snprintf (rdc.buf, rdc.buf_len, in update_directory()
334 rdc.off += snprintf (&rdc.buf[rdc.off], rdc.buf_len - rdc.off, in update_directory()
350 rdc.off += snprintf (&rdc.buf[rdc.off], rdc.buf_len - rdc.off, in update_directory()
354 if (MHD_NO == list_directory (&rdc, dir_name)) in update_directory()
356 free (rdc.buf); in update_directory()
365 rdc.off += snprintf (&rdc.buf[rdc.off], rdc.buf_len - rdc.off, in update_directory()
368 initial_allocation = rdc.buf_len; /* remember for next time */ in update_directory()
369 response = MHD_create_response_from_buffer (rdc.off, in update_directory()
370 rdc.buf, in update_directory()