client: Prefix notification methods with 'send'
This commit is contained in:
parent
3e301b8e70
commit
a003e92600
3 changed files with 10 additions and 8 deletions
|
@ -31,8 +31,8 @@ void client_kill(struct client *client);
|
|||
void client_destroy(struct client *client);
|
||||
|
||||
int client_handle_connection(int fd, uint32_t mask, void *data);
|
||||
int client_get_session(struct client *client);
|
||||
int client_enable_seat(struct client *client);
|
||||
int client_disable_seat(struct client *client);
|
||||
int client_get_session(const struct client *client);
|
||||
int client_send_enable_seat(struct client *client);
|
||||
int client_send_disable_seat(struct client *client);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -398,7 +398,7 @@ static int client_handle_opcode(struct client *client, uint16_t opcode, size_t s
|
|||
return res;
|
||||
}
|
||||
|
||||
int client_disable_seat(struct client *client) {
|
||||
int client_send_disable_seat(struct client *client) {
|
||||
struct proto_header header = {
|
||||
.opcode = SERVER_DISABLE_SEAT,
|
||||
.size = 0,
|
||||
|
@ -411,7 +411,7 @@ int client_disable_seat(struct client *client) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int client_enable_seat(struct client *client) {
|
||||
int client_send_enable_seat(struct client *client) {
|
||||
struct proto_header header = {
|
||||
.opcode = SERVER_ENABLE_SEAT,
|
||||
.size = 0,
|
||||
|
@ -473,7 +473,7 @@ fail:
|
|||
return -1;
|
||||
}
|
||||
|
||||
int client_get_session(struct client *client) {
|
||||
int client_get_session(const struct client *client) {
|
||||
if (client->seat == NULL || client->seat->active_client != client) {
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -357,6 +357,8 @@ int seat_open_client(struct seat *seat, struct client *client) {
|
|||
return -1;
|
||||
}
|
||||
|
||||
assert(seat->curttyfd == -1);
|
||||
|
||||
if (seat->vt_bound) {
|
||||
int ttyfd = terminal_open(client->seat_vt);
|
||||
if (ttyfd == -1) {
|
||||
|
@ -380,7 +382,7 @@ int seat_open_client(struct seat *seat, struct client *client) {
|
|||
log_debugf("activated %zd devices", client->devices.length);
|
||||
|
||||
seat->active_client = client;
|
||||
if (client_enable_seat(client) == -1) {
|
||||
if (client_send_enable_seat(client) == -1) {
|
||||
seat_remove_client(client);
|
||||
return -1;
|
||||
}
|
||||
|
@ -441,7 +443,7 @@ static int seat_disable_client(struct client *client) {
|
|||
log_debugf("deactivated %zd devices", client->devices.length);
|
||||
|
||||
client->pending_disable = true;
|
||||
if (client_disable_seat(seat->active_client) == -1) {
|
||||
if (client_send_disable_seat(seat->active_client) == -1) {
|
||||
seat_remove_client(client);
|
||||
return -1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue