data->nfsfh->offset = data->max_offset;
data->cb(data->max_offset - data->start_offset, nfs, data->buffer, data->private_data);
+
free_nfs_cb_data(data);
free(mdata);
}
* reads and collect into a reassembly buffer.
* we send all reads in parallell so that performance is still good.
*/
+ data->max_offset = offset;
data->start_offset = offset;
data->buffer = malloc(count);
void nfs_set_error(struct nfs_context *nfs, char *error_string, ...)
{
va_list ap;
- char *str;
+ char *str = NULL;
+ va_start(ap, error_string);
+ vasprintf(&str, error_string, ap);
if (nfs->rpc->error_string != NULL) {
free(nfs->rpc->error_string);
}
- va_start(ap, error_string);
- vasprintf(&str, error_string, ap);
nfs->rpc->error_string = str;
va_end(ap);
}