(trunk daemon) #3836 "libevent2 support" -- fix libevent #includes in the daemon/ directory

This commit is contained in:
Charles Kerr
2010-12-24 09:11:23 +00:00
parent f5b13c46dc
commit b07d0db82b
3 changed files with 5 additions and 5 deletions

View File

@@ -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>

View File

@@ -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;
} }

View File

@@ -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>