mirror of
https://github.com/transmission/transmission
synced 2024-12-26 01:27:28 +00:00
(rpc) slightly better errno handling
This commit is contained in:
parent
ebee18380e
commit
7fd0ff7fb2
1 changed files with 3 additions and 2 deletions
|
@ -301,14 +301,15 @@ serve_file( struct evhttp_request * req,
|
|||
}
|
||||
else
|
||||
{
|
||||
struct evbuffer * out = evbuffer_new( );
|
||||
struct evbuffer * out;
|
||||
|
||||
errno = error;
|
||||
out = evbuffer_new( );
|
||||
evhttp_add_header( req->output_headers, "Content-Type",
|
||||
mimetype_guess( filename ) );
|
||||
add_response( req, out, content, content_len );
|
||||
evhttp_send_reply( req, HTTP_OK, "OK", out );
|
||||
|
||||
errno = error;
|
||||
evbuffer_free( out );
|
||||
tr_free( content );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue