1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

smbd: Remove unused "struct connections_key"

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Volker Lendecke 2021-10-26 13:56:54 +02:00 committed by Jeremy Allison
parent ca8afc6604
commit 99d1f1fa10
4 changed files with 7 additions and 23 deletions

View File

@ -30,8 +30,7 @@
struct connections_forall_state {
struct db_context *session_by_pid;
int (*fn)(const struct connections_key *key,
const struct connections_data *data,
int (*fn)(const struct connections_data *data,
void *private_data);
void *private_data;
int count;
@ -89,7 +88,6 @@ static int traverse_tcon_fn(struct smbXsrv_tcon_global0 *global,
struct connections_forall_state *state =
(struct connections_forall_state*)connections_forall_state;
struct connections_key key;
struct connections_data data;
uint32_t sess_id = global->session_global_id;
@ -120,12 +118,8 @@ static int traverse_tcon_fn(struct smbXsrv_tcon_global0 *global,
memcpy((uint8_t *)&sess, val.dptr, val.dsize);
}
ZERO_STRUCT(key);
ZERO_STRUCT(data);
key.pid = data.pid = global->server_id;
key.cnum = data.cnum = global->tcon_global_id;
fstrcpy(key.name, global->share_name);
fstrcpy(data.servicename, global->share_name);
data.uid = sess.uid;
data.gid = sess.gid;
@ -140,11 +134,10 @@ static int traverse_tcon_fn(struct smbXsrv_tcon_global0 *global,
state->count++;
return state->fn(&key, &data, state->private_data);
return state->fn(&data, state->private_data);
}
int connections_forall_read(int (*fn)(const struct connections_key *key,
const struct connections_data *data,
int connections_forall_read(int (*fn)(const struct connections_data *data,
void *private_data),
void *private_data)
{

View File

@ -18,11 +18,6 @@
*/
/* key and data in the connections database - used in smbstatus and smbd */
struct connections_key {
struct server_id pid;
int cnum;
fstring name;
};
struct connections_data {
struct server_id pid;
@ -42,7 +37,6 @@ struct connections_data {
/* The following definitions come from lib/conn_tdb.c */
int connections_forall_read(int (*fn)(const struct connections_key *key,
const struct connections_data *data,
int connections_forall_read(int (*fn)(const struct connections_data *data,
void *private_data),
void *private_data);

View File

@ -93,8 +93,7 @@ static int net_status_sessions(struct net_context *c, int argc, const char **arg
return 0;
}
static int show_share(const struct connections_key *key,
const struct connections_data *crec,
static int show_share(const struct connections_data *crec,
void *state)
{
struct server_id_buf tmp;
@ -138,8 +137,7 @@ static int collect_pids(const char *key, struct sessionid *session,
return 0;
}
static int show_share_parseable(const struct connections_key *key,
const struct connections_data *crec,
static int show_share_parseable(const struct connections_data *crec,
void *state)
{
struct sessionids *ids = (struct sessionids *)state;

View File

@ -315,8 +315,7 @@ static const char *session_dialect_str(uint16_t dialect)
return unkown_dialect;
}
static int traverse_connections(const struct connections_key *key,
const struct connections_data *crec,
static int traverse_connections(const struct connections_data *crec,
void *private_data)
{
TALLOC_CTX *mem_ctx = (TALLOC_CTX *)private_data;