Add some missing 'const's.

Change-Id: I5bd26d4366e10fc8c6bc255b7ddb174a7a8b82a5
This commit is contained in:
Elliott Hughes 2015-05-07 21:38:41 -07:00
parent 0c537ce3c0
commit aee80fb67b
2 changed files with 5 additions and 5 deletions

View File

@ -696,7 +696,7 @@ int launch_server(int server_port)
// Try to handle a network forwarding request.
// This returns 1 on success, 0 on failure, and -1 to indicate this is not
// a forwarding-related request.
int handle_forward_request(const char* service, TransportType type, char* serial, int reply_fd)
int handle_forward_request(const char* service, TransportType type, const char* serial, int reply_fd)
{
if (!strcmp(service, "list-forward")) {
// Create the list of forward redirections.
@ -796,7 +796,7 @@ int handle_forward_request(const char* service, TransportType type, char* serial
return 0;
}
int handle_host_request(char *service, TransportType type, char* serial, int reply_fd, asocket *s)
int handle_host_request(const char* service, TransportType type, const char* serial, int reply_fd, asocket *s)
{
if(!strcmp(service, "kill")) {
fprintf(stderr,"adb server killed by remote request\n");
@ -856,7 +856,7 @@ int handle_host_request(char *service, TransportType type, char* serial, int rep
if (!strncmp(service, "disconnect:", 11)) {
char buffer[4096];
memset(buffer, 0, sizeof(buffer));
char* serial = service + 11;
const char* serial = service + 11;
if (serial[0] == 0) {
// disconnect from all TCP devices
unregister_all_tcp_transports();

View File

@ -284,7 +284,7 @@ asocket* create_jdwp_tracker_service_socket();
int create_jdwp_connection_fd(int jdwp_pid);
#endif
int handle_forward_request(const char* service, TransportType type, char* serial, int reply_fd);
int handle_forward_request(const char* service, TransportType type, const char* serial, int reply_fd);
#if !ADB_HOST
void framebuffer_service(int fd, void *cookie);
@ -366,7 +366,7 @@ extern int SHELL_EXIT_NOTIFY_FD;
#define USB_FFS_ADB_IN USB_FFS_ADB_EP(ep2)
#endif
int handle_host_request(char *service, TransportType type, char* serial, int reply_fd, asocket *s);
int handle_host_request(const char* service, TransportType type, const char* serial, int reply_fd, asocket *s);
void handle_online(atransport *t);
void handle_offline(atransport *t);