code style: change tabs to spaces
This commit is contained in:
parent
6e47f12118
commit
0ba692c85a
@ -371,9 +371,9 @@ void handle_message_from_client(int fd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Called when there is buffered data for this client, and select() reports
|
* Called when there is buffered data for this client, and select() reports
|
||||||
that client's pipe is writable; so we should be able to flush some
|
* that client's pipe is writable; so we should be able to flush some
|
||||||
buffered data.
|
* buffered data.
|
||||||
*/
|
*/
|
||||||
void write_buffered_data_to_client(int client_id)
|
void write_buffered_data_to_client(int client_id)
|
||||||
{
|
{
|
||||||
@ -401,8 +401,8 @@ void write_buffered_data_to_client(int client_id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
The header (hdr argument) is already built. Just read the raw data from
|
* The header (hdr argument) is already built. Just read the raw data from
|
||||||
the packet, and pass it along with the header to the client.
|
* the packet, and pass it along with the header to the client.
|
||||||
*/
|
*/
|
||||||
void get_packet_data_from_agent_and_pass_to_client(int client_id, struct client_header
|
void get_packet_data_from_agent_and_pass_to_client(int client_id, struct client_header
|
||||||
*hdr)
|
*hdr)
|
||||||
@ -440,9 +440,9 @@ void get_packet_data_from_agent_and_pass_to_client(int client_id, struct client_
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
The signal handler executes asynchronously; therefore all it should do is
|
* The signal handler executes asynchronously; therefore all it should do is
|
||||||
to set a flag "signal has arrived", and let the main even loop react to this
|
* to set a flag "signal has arrived", and let the main even loop react to this
|
||||||
flag in appropriate moment.
|
* flag in appropriate moment.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int child_exited;
|
int child_exited;
|
||||||
@ -503,7 +503,7 @@ void sanitize_name(char * untrusted_s_signed)
|
|||||||
#define ENSURE_NULL_TERMINATED(x) x[sizeof(x)-1] = 0
|
#define ENSURE_NULL_TERMINATED(x) x[sizeof(x)-1] = 0
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Called when agent sends a message asking to execute a predefined command.
|
* Called when agent sends a message asking to execute a predefined command.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void handle_execute_predefined_command(void)
|
void handle_execute_predefined_command(void)
|
||||||
@ -595,9 +595,6 @@ void handle_message_from_agent(void)
|
|||||||
s_hdr = untrusted_s_hdr;
|
s_hdr = untrusted_s_hdr;
|
||||||
/* sanitize end */
|
/* sanitize end */
|
||||||
|
|
||||||
// fprintf(stderr, "got %x %x %x\n", s_hdr.type, s_hdr.client_id,
|
|
||||||
// s_hdr.len);
|
|
||||||
|
|
||||||
if (s_hdr.type == MSG_AGENT_TO_SERVER_TRIGGER_CONNECT_EXISTING) {
|
if (s_hdr.type == MSG_AGENT_TO_SERVER_TRIGGER_CONNECT_EXISTING) {
|
||||||
handle_execute_predefined_command();
|
handle_execute_predefined_command();
|
||||||
return;
|
return;
|
||||||
@ -643,10 +640,10 @@ void handle_message_from_agent(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Scan the "clients" table, add ones we want to read from (because the other
|
* Scan the "clients" table, add ones we want to read from (because the other
|
||||||
end has not send MSG_XOFF on them) to read_fdset, add ones we want to write
|
* end has not send MSG_XOFF on them) to read_fdset, add ones we want to write
|
||||||
to (because its pipe is full) to write_fdset. Return the highest used file
|
* to (because its pipe is full) to write_fdset. Return the highest used file
|
||||||
descriptor number, needed for the first select() parameter.
|
* descriptor number, needed for the first select() parameter.
|
||||||
*/
|
*/
|
||||||
int fill_fdsets_for_select(fd_set * read_fdset, fd_set * write_fdset)
|
int fill_fdsets_for_select(fd_set * read_fdset, fd_set * write_fdset)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user