FreeBSD/contrib/subversion/subversion/libsvn_ra_serf/update.c
/* Serf callback to create update request body bucket.
   Implements svn_ra_serf__request_body_delegate_t */
Serf callback to create update request body bucket.
Serf callback to create update request body bucket .
static svn_error_t *
create_update_report_body(serf_bucket_t **body_bkt,
                          void *baton,
                          serf_bucket_alloc_t *alloc,
                          apr_pool_t *pool ,
                          apr_pool_t *scratch_pool)
{
  report_context_t *report = baton;
  body_create_baton_t *body = report->body;
  if (body->file)
    {
      apr_off_t offset;
      offset = 0;
      SVN_ERR(svn_io_file_seek(body->file, APR_SET, &offset, pool));
      *body_bkt = serf_bucket_file_create(report->body->file, alloc);
    }
  else
    {
      *body_bkt = serf_bucket_simple_create(body->all_data,
                                            body->total_bytes,
                                            NULL, NULL, alloc);
    }
  return SVN_NO_ERROR;
}
static svn_error_t * create_update_report_body ( serf_bucket_t * * body_bkt , void * baton , serf_bucket_alloc_t * alloc , apr_pool_t * pool , apr_pool_t * scratch_pool ) { report_context_t * report = baton ; body_create_baton_t * body = report -> body ; if ( body -> file ) { apr_off_t offset ; offset = 0 ; SVN_ERR ( svn_io_file_seek ( body -> file , APR_SET , & offset , pool ) ) ; * body_bkt = serf_bucket_file_create ( report -> body -> file , alloc ) ; } else { * body_bkt = serf_bucket_simple_create ( body -> all_data , body -> total_bytes , NULL , NULL , alloc ) ; } return SVN_NO_ERROR ; }
Serf callback to create update request body bucket.
Serf callback to create update request body bucket .
/* request pool */