1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-04 17:47:26 +03:00

merge from tridge

(This used to be ctdb commit 8648104f8d76d22427c14422b126f7e979cc2d95)
This commit is contained in:
Ronnie Sahlberg 2007-05-05 16:51:34 +10:00
commit 2e64727079
4 changed files with 5 additions and 3 deletions

View File

@ -359,7 +359,7 @@ static int32_t ctdb_control_dispatch(struct ctdb_context *ctdb,
case CTDB_CONTROL_PING:
CHECK_CONTROL_DATA_SIZE(0);
ctdb->status.controls.ping++;
return ctdb->num_clients;
return ctdb->status.num_clients;
case CTDB_CONTROL_GET_DBNAME: {
uint32_t db_id;

View File

@ -248,7 +248,7 @@ static void daemon_request_connect_wait(struct ctdb_client *client,
static int ctdb_client_destructor(struct ctdb_client *client)
{
ctdb_reqid_remove(client->ctdb, client->client_id);
client->ctdb->num_clients--;
client->ctdb->status.num_clients--;
close(client->fd);
client->fd = -1;
return 0;
@ -559,7 +559,7 @@ static void ctdb_accept_client(struct event_context *ev, struct fd_event *fde,
client->ctdb = ctdb;
client->fd = fd;
client->client_id = ctdb_reqid_new(ctdb, client);
ctdb->num_clients++;
ctdb->status.num_clients++;
client->queue = ctdb_queue_setup(ctdb, client, fd, CTDB_DS_ALIGNMENT,
ctdb_daemon_read_cb, client);

View File

@ -135,6 +135,7 @@ struct ctdb_daemon_data {
ctdb status information
*/
struct ctdb_status {
uint32_t num_clients;
uint32_t client_packets_sent;
uint32_t client_packets_recv;
uint32_t node_packets_sent;

View File

@ -97,6 +97,7 @@ static void show_status(struct ctdb_status *s)
uint32_t offset;
} fields[] = {
#define STATUS_FIELD(n) { #n, offsetof(struct ctdb_status, n) }
STATUS_FIELD(num_clients),
STATUS_FIELD(client_packets_sent),
STATUS_FIELD(client_packets_recv),
STATUS_FIELD(node_packets_sent),