!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
*/
-static int oop_event_context_destructor(void *ptr)
+static int oop_event_context_destructor(struct event_context *ev)
{
- struct event_context *ev = talloc_get_type(ptr, struct event_context);
oop_source_sys *oop_sys = ev->additional_data;
oop_sys_delete(oop_sys);
/*
destroy an fd_event
*/
-static int oop_event_fd_destructor(void *ptr)
+static int oop_event_fd_destructor(struct fd_event *fde)
{
- struct fd_event *fde = talloc_get_type(ptr, struct fd_event);
struct event_context *ev = fde->event_ctx;
oop_source_sys *oop_sys = ev->additional_data;
oop_source *oop = oop_sys_source(oop_sys);
fde->flags = flags;
}
-static int oop_event_timed_destructor(void *ptr);
-static int oop_event_timed_deny_destructor(void *ptr)
+static int oop_event_timed_destructor(struct timed_event *te);
+
+static int oop_event_timed_deny_destructor(struct timed_event *te)
{
return -1;
}
/*
destroy a timed event
*/
-static int oop_event_timed_destructor(void *ptr)
+static int oop_event_timed_destructor(struct timed_event *te)
{
- struct timed_event *te = talloc_get_type(ptr, struct timed_event);
struct event_context *ev = te->event_ctx;
oop_source_sys *oop_sys = ev->additional_data;
oop_source *oop = oop_sys_source(oop_sys);
/*
free the epoll fd
*/
-static int epoll_ctx_destructor(void *ptr)
+static int epoll_ctx_destructor(struct std_event_context *std_ev)
{
- struct std_event_context *std_ev = talloc_get_type(ptr,
- struct std_event_context);
close(std_ev->epoll_fd);
std_ev->epoll_fd = -1;
return 0;
/*
destroy an fd_event
*/
-static int std_event_fd_destructor(void *ptr)
+static int std_event_fd_destructor(struct fd_event *fde)
{
- struct fd_event *fde = talloc_get_type(ptr, struct fd_event);
struct event_context *ev = fde->event_ctx;
struct std_event_context *std_ev = talloc_get_type(ev->additional_data,
struct std_event_context);
/*
destroy a timed event
*/
-static int std_event_timed_destructor(void *ptr)
+static int std_event_timed_destructor(struct timed_event *te)
{
- struct timed_event *te = talloc_get_type(ptr, struct timed_event);
struct std_event_context *std_ev = talloc_get_type(te->event_ctx->additional_data,
struct std_event_context);
DLIST_REMOVE(std_ev->timed_events, te);
return 0;
}
-static int std_event_timed_deny_destructor(void *ptr)
+static int std_event_timed_deny_destructor(struct timed_event *te)
{
return -1;
}
};
-static int lldb_destructor(void *p)
+static int lldb_destructor(struct lldb_private *lldb)
{
- struct lldb_private *lldb = p;
ldap_unbind(lldb->ldap);
return 0;
}
return -1;
}
-static int
-destructor(void *p)
-{
- struct lsqlite3_private *lsqlite3 = p;
-
+static int destructor(struct lsqlite3_private *lsqlite3)
+{
if (lsqlite3->sqlite) {
sqlite3_close(lsqlite3->sqlite);
}
static struct ltdb_wrap *tdb_list;
/* destroy the last connection to a tdb */
-static int ltdb_wrap_destructor(void *ctx)
+static int ltdb_wrap_destructor(struct ltdb_wrap *w)
{
- struct ltdb_wrap *w = talloc_get_type(ctx, struct ltdb_wrap);
tdb_close(w->tdb);
if (w->next) {
w->next->prev = w->prev;
};
-int store_destructor(void *data)
+int store_destructor(struct results_store *store)
{
- struct results_store *store = talloc_get_type(data, struct results_store);
-
if (store->prev) {
store->prev->next = store->next;
}
return ldb_next_del_trans(module);
}
-static int skel_destructor(void *module_ctx)
+static int skel_destructor(struct ldb_module *ctx)
{
- struct ldb_module *ctx = talloc_get_type(module_ctx, struct ldb_module);
struct private_data *data = talloc_get_type(ctx->private_data, struct private_data);
/* put your clean-up functions here */
if (data->some_private_data) talloc_free(data->some_private_data);
/*
destroy the messaging context
*/
-static int messaging_destructor(void *ptr)
+static int messaging_destructor(struct messaging_context *msg)
{
- struct messaging_context *msg = ptr;
unlink(msg->path);
while (msg->names && msg->names[0]) {
irpc_remove_name(msg, msg->names[0]);
/*
destroy a irpc request
*/
-static int irpc_destructor(void *ptr)
+static int irpc_destructor(struct irpc_request *irpc)
{
- struct irpc_request *irpc = talloc_get_type(ptr, struct irpc_request);
idr_remove(irpc->msg_ctx->idr, irpc->callid);
return 0;
}
int subkey_count, value_count;
};
-static int ldb_free_hive (void *_hive)
+static int ldb_free_hive (struct registry_hive *hive)
{
- struct registry_hive *hive = _hive;
talloc_free(hive->backend_data);
hive->backend_data = NULL;
return 0;
}
-static int reg_close_ldb_key (void *data)
+static int reg_close_ldb_key(struct registry_key *key)
{
- struct registry_key *key = data;
struct ldb_key_data *kd = talloc_get_type(key->backend_data, struct ldb_key_data);
/* struct ldb_context *c = key->hive->backend_data; */
/*
auto-close sockets on free
*/
-static int socket_destructor(void *ptr)
+static int socket_destructor(struct socket_context *sock)
{
- struct socket_context *sock = ptr;
if (sock->ops->fn_close) {
sock->ops->fn_close(sock);
}
a destructor used when we are processing packets to prevent freeing of this
context while it is being used
*/
-static int packet_destructor(void *p)
+static int packet_destructor(struct packet_context *pc)
{
- struct packet_context *pc = talloc_get_type(p, struct packet_context);
-
if (pc->busy) {
pc->destructor_called = True;
/* now we refuse the talloc_free() request. The free will
/*
destroy a tls session
*/
-static int tls_destructor(void *ptr)
+static int tls_destructor(struct tls_context *tls)
{
- struct tls_context *tls = talloc_get_type(ptr, struct tls_context);
int ret;
ret = gnutls_bye(tls->session, GNUTLS_SHUT_WR);
if (ret < 0) {
uid_t uid;
};
-static int privileges_destructor(void *ptr)
+static int privileges_destructor(struct saved_state *s)
{
- struct saved_state *s = ptr;
if (geteuid() != s->uid &&
seteuid(s->uid) != 0) {
smb_panic("Failed to restore privileges");
/*
destroy a pending request
*/
-static int cldap_request_destructor(void *ptr)
+static int cldap_request_destructor(struct cldap_request *req)
{
- struct cldap_request *req = talloc_get_type(ptr, struct cldap_request);
if (req->state == CLDAP_REQUEST_SEND) {
DLIST_REMOVE(req->cldap->send_queue, req);
}
/*
destroy a mailslot handler
*/
-static int dgram_mailslot_destructor(void *ptr)
+static int dgram_mailslot_destructor(struct dgram_mailslot_handler *dgmslot)
{
- struct dgram_mailslot_handler *dgmslot =
- talloc_get_type(ptr, struct dgram_mailslot_handler);
-
DLIST_REMOVE(dgmslot->dgmsock->mailslot_handlers, dgmslot);
return 0;
}
}
/* destroy an open ldap request */
-static int ldap_request_destructor(void *ptr)
+static int ldap_request_destructor(struct ldap_request *req)
{
- struct ldap_request *req = talloc_get_type(ptr, struct ldap_request);
if (req->state == LDAP_REQUEST_PENDING) {
DLIST_REMOVE(req->conn->pending, req);
}
/*
destroy a pending request
*/
-static int nbt_name_request_destructor(void *ptr)
-{
- struct nbt_name_request *req = talloc_get_type(ptr, struct nbt_name_request);
-
+static int nbt_name_request_destructor(struct nbt_name_request *req)
+{
if (req->state == NBT_REQUEST_SEND) {
DLIST_REMOVE(req->nbtsock->send_queue, req);
}
/*
destroy a transport
*/
-static int transport_destructor(void *ptr)
+static int transport_destructor(struct smbcli_transport *transport)
{
- struct smbcli_transport *transport = ptr;
-
smbcli_transport_dead(transport);
return 0;
}
/*
destroy a request
*/
-static int smbcli_request_destructor(void *ptr)
+static int smbcli_request_destructor(struct smbcli_request *req)
{
- struct smbcli_request *req = talloc_get_type(ptr, struct smbcli_request);
if (req->state == SMBCLI_REQUEST_RECV) {
DLIST_REMOVE(req->transport->pending_recv, req);
}
name resolution without leaving a potentially blocking call running
in a child
*/
-static int host_destructor(void *ptr)
+static int host_destructor(struct host_state *state)
{
- struct host_state *state = talloc_get_type(ptr, struct host_state);
close(state->child_fd);
if (state->child != (pid_t)-1) {
kill(state->child, SIGTERM);
/*
destroy a transport
*/
-static int transport_destructor(void *ptr)
+static int transport_destructor(struct smb2_transport *transport)
{
- struct smb2_transport *transport = ptr;
smb2_transport_dead(transport);
return 0;
}
/*
destroy a request
*/
-static int smb2_request_destructor(void *ptr)
+static int smb2_request_destructor(struct smb2_request *req)
{
- struct smb2_request *req = talloc_get_type(ptr, struct smb2_request);
if (req->state == SMB2_REQUEST_RECV) {
DLIST_REMOVE(req->transport->pending_recv, req);
}
/*
destroy a wrepl_socket destructor
*/
-static int wrepl_socket_destructor(void *ptr)
+static int wrepl_socket_destructor(struct wrepl_socket *sock)
{
- struct wrepl_socket *sock = talloc_get_type(ptr, struct wrepl_socket);
if (sock->dead) {
sock->free_skipped = True;
return -1;
/*
destroy a wrepl_request
*/
-static int wrepl_request_destructor(void *ptr)
+static int wrepl_request_destructor(struct wrepl_request *req)
{
- struct wrepl_request *req = talloc_get_type(ptr, struct wrepl_request);
if (req->state == WREPL_REQUEST_RECV) {
DLIST_REMOVE(req->wrepl_socket->recv_queue, req);
}
struct wrepl_socket *wrepl_sock;
};
-static int wrepl_send_ctrl_destructor(void *ptr)
+static int wrepl_send_ctrl_destructor(struct wrepl_send_ctrl_state *s)
{
- struct wrepl_send_ctrl_state *s = talloc_get_type(ptr, struct wrepl_send_ctrl_state);
struct wrepl_request *req = s->wrepl_sock->recv_queue;
/* check if the request is still in WREPL_STATE_RECV,
static void dcerpc_ship_next_request(struct dcerpc_connection *c);
/* destroy a dcerpc connection */
-static int dcerpc_connection_destructor(void *ptr)
+static int dcerpc_connection_destructor(struct dcerpc_connection *c)
{
- struct dcerpc_connection *c = ptr;
if (c->transport.shutdown_pipe) {
c->transport.shutdown_pipe(c);
}
/*
make sure requests are cleaned up
*/
-static int dcerpc_req_destructor(void *ptr)
+static int dcerpc_req_destructor(struct rpc_request *req)
{
- struct rpc_request *req = ptr;
DLIST_REMOVE(req->p->conn->pending, req);
return 0;
}
/*
destroy an async info structure
*/
-static int async_info_destructor(void *p)
+static int async_info_destructor(struct async_info *async)
{
- struct async_info *async = talloc_get_type(p, struct async_info);
DLIST_REMOVE(async->cvfs->pending, async);
return 0;
}
/*
destroy the notify context
*/
-static int notify_destructor(void *p)
+static int notify_destructor(struct notify_context *notify)
{
- struct notify_context *notify = talloc_get_type(p, struct notify_context);
messaging_deregister(notify->messaging_ctx, MSG_PVFS_NOTIFY, notify);
notify_remove_all(notify);
return 0;
/*
destroy a lock on the database
*/
-static int odb_lock_destructor(void *ptr)
+static int odb_lock_destructor(struct odb_lock *lck)
{
- struct odb_lock *lck = ptr;
tdb_chainunlock(lck->odb->w->tdb, lck->key);
return 0;
}
/*
destroy a open pipe structure
*/
-static int ipc_fd_destructor(void *ptr)
+static int ipc_fd_destructor(struct pipe_state *p)
{
- struct pipe_state *p = ptr;
DLIST_REMOVE(p->private->pipe_list, p);
return 0;
}
/*
destroy an open search
*/
-static int pvfs_dirlist_destructor(void *ptr)
+static int pvfs_dirlist_destructor(struct pvfs_dir *dir)
{
- struct pvfs_dir *dir = ptr;
if (dir->dir) closedir(dir->dir);
return 0;
}
/*
destroy a notify buffer. Called when the handle is closed
*/
-static int pvfs_notify_destructor(void *ptr)
+static int pvfs_notify_destructor(struct pvfs_notify_buffer *n)
{
- struct pvfs_notify_buffer *n = talloc_get_type(ptr, struct pvfs_notify_buffer);
notify_remove(n->f->pvfs->notify_context, n);
n->f->notify_buffer = NULL;
pvfs_notify_send(n, NT_STATUS_OK, True);
/*
cleanup a open directory handle
*/
-static int pvfs_dir_handle_destructor(void *p)
+static int pvfs_dir_handle_destructor(struct pvfs_file_handle *h)
{
- struct pvfs_file_handle *h = p;
int open_count;
char *path = NULL;
/*
cleanup a open directory fnum
*/
-static int pvfs_dir_fnum_destructor(void *p)
+static int pvfs_dir_fnum_destructor(struct pvfs_file *f)
{
- struct pvfs_file *f = p;
-
DLIST_REMOVE(f->pvfs->files.list, f);
ntvfs_handle_remove_backend_data(f->ntvfs, f->pvfs->ntvfs);
/*
destroy a struct pvfs_file_handle
*/
-static int pvfs_handle_destructor(void *p)
+static int pvfs_handle_destructor(struct pvfs_file_handle *h)
{
- struct pvfs_file_handle *h = p;
int open_count;
char *path = NULL;
/*
destroy a struct pvfs_file
*/
-static int pvfs_fnum_destructor(void *p)
+static int pvfs_fnum_destructor(struct pvfs_file *f)
{
- struct pvfs_file *f = talloc_get_type(p, struct pvfs_file);
-
DLIST_REMOVE(f->pvfs->files.list, f);
pvfs_lock_close(f->pvfs, f);
ntvfs_handle_remove_backend_data(f->ntvfs, f->pvfs->ntvfs);
};
/* destroy a pending open request */
-static int pvfs_retry_destructor(void *ptr)
+static int pvfs_retry_destructor(struct pvfs_open_retry *r)
{
- struct pvfs_open_retry *r = ptr;
struct pvfs_state *pvfs = r->ntvfs->private_data;
if (r->odb_locking_key.data) {
struct odb_lock *lck;