mirror of
https://github.com/transmission/transmission.git
synced 2025-12-20 02:18:42 +00:00
(trunk daemon) #3836 "libevent2 support" -- fix libevent #includes in the daemon/ directory
This commit is contained in:
@@ -25,7 +25,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#include <unistd.h> /* daemon */
|
#include <unistd.h> /* daemon */
|
||||||
|
|
||||||
#include <event.h>
|
#include <event2/buffer.h>
|
||||||
|
|
||||||
#include <libtransmission/transmission.h>
|
#include <libtransmission/transmission.h>
|
||||||
#include <libtransmission/bencode.h>
|
#include <libtransmission/bencode.h>
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
#include <unistd.h> /* getcwd */
|
#include <unistd.h> /* getcwd */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <event.h>
|
#include <event2/buffer.h>
|
||||||
|
|
||||||
#define CURL_DISABLE_TYPECHECK /* otherwise -Wunreachable-code goes insane */
|
#define CURL_DISABLE_TYPECHECK /* otherwise -Wunreachable-code goes insane */
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
@@ -1723,7 +1723,7 @@ flush( const char * rpcurl, tr_benc ** benc )
|
|||||||
curl_easy_getinfo( curl, CURLINFO_RESPONSE_CODE, &response );
|
curl_easy_getinfo( curl, CURLINFO_RESPONSE_CODE, &response );
|
||||||
switch( response ) {
|
switch( response ) {
|
||||||
case 200:
|
case 200:
|
||||||
status |= processResponse( rpcurl, EVBUFFER_DATA(buf), EVBUFFER_LENGTH(buf) );
|
status |= processResponse( rpcurl, (const char*) evbuffer_pullup( buf, -1 ), evbuffer_get_length( buf ) );
|
||||||
break;
|
break;
|
||||||
case 409:
|
case 409:
|
||||||
/* session id failed. our curl header func has already
|
/* session id failed. our curl header func has already
|
||||||
@@ -1735,7 +1735,7 @@ flush( const char * rpcurl, tr_benc ** benc )
|
|||||||
benc = NULL;
|
benc = NULL;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
fprintf( stderr, "Unexpected response: %s\n", (char*)EVBUFFER_DATA(buf) );
|
fprintf( stderr, "Unexpected response: %s\n", evbuffer_pullup( buf, -1 ) );
|
||||||
status |= EXIT_FAILURE;
|
status |= EXIT_FAILURE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
#else
|
#else
|
||||||
#include <sys/types.h> /* stat */
|
#include <sys/types.h> /* stat */
|
||||||
#include <sys/stat.h> /* stat */
|
#include <sys/stat.h> /* stat */
|
||||||
#include <event.h> /* evbuffer */
|
#include <event2/buffer.h> /* evbuffer */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|||||||
Reference in New Issue
Block a user