TEVENT_FD_WRITEABLE(queue->fde);
}
- DLIST_ADD_END(queue->out_queue, pkt, NULL);
+ DLIST_ADD_END(queue->out_queue, pkt);
queue->out_queue_length++;
call->ctdb = ctdb_db->ctdb;
call->hdr = talloc_steal(call, hdr);
- DLIST_ADD_END(ddq->deferred_calls, call, NULL);
+ DLIST_ADD_END(ddq->deferred_calls, call);
return 0;
}
set_close_on_exec(rc->fd[0]);
/* This is an active revokechild child process */
- DLIST_ADD_END(ctdb_db->revokechild_active, rc, NULL);
+ DLIST_ADD_END(ctdb_db->revokechild_active, rc);
rc->fde = tevent_add_fd(ctdb->ev, rc, rc->fd[0], TEVENT_FD_READ,
revokechild_handler, (void *)rc);
dfc->w->ctdb = ctdb_db->ctdb;
dfc->w->client_id = client->client_id;
- DLIST_ADD_END(dfq->deferred_calls, dfc, NULL);
+ DLIST_ADD_END(dfq->deferred_calls, dfc);
return 0;
}
/* Move the context from pending to current */
if (lock_ctx->type == LOCK_RECORD) {
DLIST_REMOVE(lock_ctx->ctdb_db->lock_pending, lock_ctx);
- DLIST_ADD_END(lock_ctx->ctdb_db->lock_current, lock_ctx, NULL);
+ DLIST_ADD_END(lock_ctx->ctdb_db->lock_current, lock_ctx);
} else {
DLIST_REMOVE(ctdb->lock_pending, lock_ctx);
- DLIST_ADD_END(ctdb->lock_current, lock_ctx, NULL);
+ DLIST_ADD_END(ctdb->lock_current, lock_ctx);
}
CTDB_DECREMENT_STAT(lock_ctx->ctdb, locks.num_pending);
CTDB_INCREMENT_STAT(lock_ctx->ctdb, locks.num_current);
* immediately, so keep them at the head of the pending queue.
*/
if (lock_ctx->type == LOCK_RECORD) {
- DLIST_ADD_END(ctdb_db->lock_pending, lock_ctx, NULL);
+ DLIST_ADD_END(ctdb_db->lock_pending, lock_ctx);
} else {
- DLIST_ADD_END(ctdb->lock_pending, lock_ctx, NULL);
+ DLIST_ADD_END(ctdb->lock_pending, lock_ctx);
}
CTDB_INCREMENT_STAT(ctdb, locks.num_pending);
if (ctdb_db) {
b->prefix = prefix;
b->setup = setup;
- DLIST_ADD_END(log_state->backends, b, NULL);
+ DLIST_ADD_END(log_state->backends, b);
}
test->dangerous = false;
test->data = data;
- DLIST_ADD_END(tcase->tests, test, struct torture_test *);
+ DLIST_ADD_END(tcase->tests, test);
return test;
}
tcase->fixture_persistent = true;
tcase->tests = NULL;
- DLIST_ADD_END(suite->testcases, tcase, struct torture_tcase *);
+ DLIST_ADD_END(suite->testcases, tcase);
return true;
}
test->data = data;
test->dangerous = false;
- DLIST_ADD_END(tcase->tests, test, struct torture_test *);
+ DLIST_ADD_END(tcase->tests, test);
return tcase;
}
test->fn = run;
test->dangerous = false;
- DLIST_ADD_END(tcase->tests, test, struct torture_test *);
+ DLIST_ADD_END(tcase->tests, test);
return tcase;
}
if (child == NULL)
return false;
- DLIST_ADD_END(suite->children, child, struct torture_suite *);
+ DLIST_ADD_END(suite->children, child);
/* FIXME: Check for duplicates and return false if the
* added suite already exists as a child */
test->data = NULL;
test->dangerous = false;
- DLIST_ADD_END(tcase->tests, test, struct torture_test *);
+ DLIST_ADD_END(tcase->tests, test);
return test;
}
test->data = NULL;
test->dangerous = false;
- DLIST_ADD_END(tcase->tests, test, struct torture_test *);
+ DLIST_ADD_END(tcase->tests, test);
return test;
}
/*
add to the end of a list.
- Note that 'type' is ignored
*/
-#define DLIST_ADD_END(list, p, type) \
+#define DLIST_ADD_END(list, p) \
do { \
if (!(list)) { \
DLIST_ADD(list, p); \
#define DLIST_DEMOTE(list, p, type) \
do { \
DLIST_REMOVE(list, p); \
- DLIST_ADD_END(list, p, NULL); \
+ DLIST_ADD_END(list, p); \
} while (0)
/*
torture_comment(tctx, "add 5 elements at end\n");
for (i=0; i<5; i++) {
el = talloc(mem_ctx, struct listel);
- DLIST_ADD_END(l1, el, NULL);
+ DLIST_ADD_END(l1, el);
}
torture_comment(tctx, "delete 3 from front\n");
for (i=0; i < 3; i++) {
el = DLIST_TAIL(l1);
DLIST_REMOVE(l1, el);
- DLIST_ADD_END(l2, el, NULL);
+ DLIST_ADD_END(l2, el);
}
torture_comment(tctx, "count forward\n");
}
tevent_req_set_callback(subreq, cldap_search_state_queue_done, req);
- DLIST_ADD_END(cldap->searches.list, state, struct cldap_search_state *);
+ DLIST_ADD_END(cldap->searches.list, state);
return req;
nbt_name_socket_timeout, req);
if (req->state != NBT_REQUEST_SEND) {
req->state = NBT_REQUEST_SEND;
- DLIST_ADD_END(req->nbtsock->send_queue, req,
- struct nbt_name_request *);
+ DLIST_ADD_END(req->nbtsock->send_queue, req);
}
TEVENT_FD_WRITEABLE(req->nbtsock->fde);
return;
(ndr_push_flags_fn_t)ndr_push_nbt_name_packet);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) goto failed;
- DLIST_ADD_END(nbtsock->send_queue, req, struct nbt_name_request *);
+ DLIST_ADD_END(nbtsock->send_queue, req);
if (DEBUGLVL(10)) {
DEBUG(10,("Queueing nbt packet to %s:%d\n",
return ndr_map_error2ntstatus(ndr_err);
}
- DLIST_ADD_END(nbtsock->send_queue, req, struct nbt_name_request *);
+ DLIST_ADD_END(nbtsock->send_queue, req);
TEVENT_FD_WRITEABLE(nbtsock->fde);
}
talloc_set_destructor(session, smbXcli_session_destructor);
- DLIST_ADD_END(conn->sessions, session, struct smbXcli_session *);
+ DLIST_ADD_END(conn->sessions, session);
session->conn = conn;
memcpy(session->smb2_channel.preauth_sha512,
session->smb2_channel = src->smb2_channel;
session->disconnect_expired = src->disconnect_expired;
- DLIST_ADD_END(src->conn->sessions, session, struct smbXcli_session *);
+ DLIST_ADD_END(src->conn->sessions, session);
talloc_set_destructor(session, smbXcli_session_destructor);
return session;
}
talloc_set_destructor(session2, smbXcli_session_destructor);
- DLIST_ADD_END(conn->sessions, session2, struct smbXcli_session *);
+ DLIST_ADD_END(conn->sessions, session2);
session2->conn = conn;
memcpy(session2->smb2_channel.preauth_sha512,
for (;*text_list; text_list++) {
if (load_auth_module(*auth_context, *text_list, &t)) {
- DLIST_ADD_END(list, t, auth_methods *);
+ DLIST_ADD_END(list, t);
}
}
ZERO_STRUCTP(t);
- DLIST_ADD_END(list, t, struct chat_struct*);
+ DLIST_ADD_END(list, t);
if (!next_token_talloc(frame, &p, &prompt, NULL)) {
break;
t = SMB_XMALLOC_P(struct smbldap_state_lookup);
ZERO_STRUCTP(t);
- DLIST_ADD_END(smbldap_state_lookup_list, t, struct smbldap_state_lookup *);
+ DLIST_ADD_END(smbldap_state_lookup_list, t);
t->ld = ld;
t->smbldap_state = smbldap_state;
}
msghdr_copy(hdr, msghdrlen, NULL, 0, iov, iovcnt,
fds_copy, num_fds);
- DLIST_ADD_END(q->msgs, msg, struct unix_dgram_msg);
+ DLIST_ADD_END(q->msgs, msg);
return 0;
fail:
close_fd_array(fds_copy, num_fds);
return NULL;
}
- DLIST_ADD_END(ea_list_head, eal, struct ea_list *);
+ DLIST_ADD_END(ea_list_head, eal);
if (next_offset == 0) {
break;
}
/* Enter into the list. */
if (referring_cli) {
- DLIST_ADD_END(referring_cli, cli, struct cli_state *);
+ DLIST_ADD_END(referring_cli, cli);
}
if (referring_cli && referring_cli->requested_posix_capabilities) {
state->next_offset += chunk->total_size;
state->remaining -= chunk->total_size;
- DLIST_ADD_END(state->chunks, chunk, NULL);
+ DLIST_ADD_END(state->chunks, chunk);
state->num_chunks++;
state->num_waiting++;
}
state->next_offset += chunk->total_size;
- DLIST_ADD_END(state->chunks, chunk, NULL);
+ DLIST_ADD_END(state->chunks, chunk);
state->num_chunks++;
state->num_waiting++;
}
talloc_set_destructor(opd, opd_destructor);
- DLIST_ADD_END(open_pd_list, opd, struct aio_open_private_data *);
+ DLIST_ADD_END(open_pd_list, opd);
return opd;
}
browc->ip = ip;
- DLIST_ADD_END(lmb_browserlist, browc, struct browse_cache_record *);
+ DLIST_ADD_END(lmb_browserlist, browc);
DEBUG(3, ("nmbd_browserdb:create_browser_in_lmb_cache()\n"));
DEBUGADD(3, (" Added lmb cache entry for workgroup %s name %s IP %s "
void queue_packet(struct packet_struct *packet)
{
- DLIST_ADD_END(packet_queue, packet, struct packet_struct *);
+ DLIST_ADD_END(packet_queue, packet);
}
/****************************************************************************
DEBUG(4,("add_response_record: adding response record id:%hu to subnet %s. num_records:%d\n",
rrec->response_id, subrec->subnet_name, num_response_packets));
- DLIST_ADD_END(subrec->responselist, rrec, struct response_record *);
+ DLIST_ADD_END(subrec->responselist, rrec);
}
/***************************************************************************
static void add_server_to_workgroup(struct work_record *work,
struct server_record *servrec)
{
- DLIST_ADD_END(work->serverlist, servrec, struct server_record *);
+ DLIST_ADD_END(work->serverlist, servrec);
work->subnet->work_changed = True;
}
return false;
}
- DLIST_ADD_END(stored_options, entry, struct lp_stored_option);
+ DLIST_ADD_END(stored_options, entry);
return true;
}
* the messages are sent in the order they were received. JRA.
*/
- DLIST_ADD_END(notify_queue_head, pnqueue, struct notify_queue *);
+ DLIST_ADD_END(notify_queue_head, pnqueue);
num_messages++;
if ((notify_event == NULL) && (ev != NULL)) {
nk->sec_desc->size = ndr_size_security_descriptor(sec_desc, 0)
+ sizeof(uint32_t);
- DLIST_ADD_END( file->sec_desc_list, nk->sec_desc, REGF_SK_REC *);
+ DLIST_ADD_END( file->sec_desc_list, nk->sec_desc);
/* update the offsets for us and the previous sd in the list.
if this is the first record, then just set the next and prev
while (sc_smap != NULL) {
struct fss_sc_smap *smap_next = sc_smap->next;
DLIST_REMOVE(sc->smaps, sc_smap);
- DLIST_ADD_END(prunable_sc_smaps, sc_smap,
- struct fss_sc_smap *);
+ DLIST_ADD_END(prunable_sc_smaps, sc_smap);
sc->smaps_count--;
sc_smap = smap_next;
}
}
sc_set->state = FSS_SC_STARTED;
sc_set->context = fss_global.cur_ctx;
- DLIST_ADD_END(fss_global.sc_sets, sc_set, struct fss_sc_set *);
+ DLIST_ADD_END(fss_global.sc_sets, sc_set);
fss_global.sc_sets_count++;
DEBUG(6, ("%s: shadow-copy set %u added\n",
sc_set->id_str, fss_global.sc_sets_count));
}
/* add share map to shadow-copy */
- DLIST_ADD_END(sc->smaps, sc_smap, struct fss_sc_smap *);
+ DLIST_ADD_END(sc->smaps, sc_smap);
sc->smaps_count++;
/* add shadow-copy to shadow-copy set */
- DLIST_ADD_END(sc_set->scs, sc, struct fss_sc *);
+ DLIST_ADD_END(sc_set->scs, sc);
sc_set->scs_count++;
DEBUG(4, ("added volume %s to shadow copy set with GUID %s\n",
sc->volume_name, sc_set->id_str));
if (!NT_STATUS_IS_OK(status)) {
return -1;
}
- DLIST_ADD_END(trv_state->smaps, smap, struct fss_sc_smap *);
+ DLIST_ADD_END(trv_state->smaps, smap);
trv_state->smaps_count++;
} else if (strstr((char *)key.dptr, FSS_DB_KEY_PFX_SC) != NULL) {
struct fss_sc *sc;
if (!NT_STATUS_IS_OK(status)) {
return -1;
}
- DLIST_ADD_END(trv_state->scs, sc, struct fss_sc *);
+ DLIST_ADD_END(trv_state->scs, sc);
trv_state->scs_count++;
} else if (strstr((char *)key.dptr, FSS_DB_KEY_PFX_SC_SET) != NULL) {
struct fss_sc_set *sc_set;
if (!NT_STATUS_IS_OK(status)) {
return -1;
}
- DLIST_ADD_END(trv_state->sc_sets, sc_set, struct fss_sc_set *);
+ DLIST_ADD_END(trv_state->sc_sets, sc_set);
trv_state->sc_sets_count++;
} else {
/* global context and db vers */
talloc_steal(sc, smap);
DLIST_REMOVE(trv_state->smaps, smap);
trv_state->smaps_count--;
- DLIST_ADD_END(sc->smaps, smap, struct fss_sc_smap *);
+ DLIST_ADD_END(sc->smaps, smap);
smaps_moved++;
/* last component of the tdb key path is the sc share name */
talloc_steal(sc_set, sc);
DLIST_REMOVE(trv_state->scs, sc);
trv_state->scs_count--;
- DLIST_ADD_END(sc_set->scs, sc, struct fss_sc *);
+ DLIST_ADD_END(sc_set->scs, sc);
scs_moved++;
sc->sc_set = sc_set;
/* sc_set mem already owned by trv_state->mem_ctx */
DLIST_REMOVE(trv_state->sc_sets, sc_set);
trv_state->sc_sets_count--;
- DLIST_ADD_END(*sc_sets, sc_set, struct fss_sc_set *);
+ DLIST_ADD_END(*sc_sets, sc_set);
i++;
/* last component of the tdb key path is the sc_set GUID str */
SMB_PERFCOUNT_DEFER_OP(&req->pcd, &req->pcd);
blr->req = talloc_move(blr, &req);
- DLIST_ADD_END(sconn->smb1.locks.blocking_lock_queue, blr, struct blocking_lock_record *);
+ DLIST_ADD_END(sconn->smb1.locks.blocking_lock_queue, blr);
recalc_brl_timeout(sconn);
/* Ensure we'll receive messages when this is unlocked. */
request->reply_fn = reply_fn;
request->backend_data = NULL;
- DLIST_ADD_END(fsp->notify->requests, request,
- struct notify_change_request *);
+ DLIST_ADD_END(fsp->notify->requests, request);
map->mid = request->req->mid;
DLIST_ADD(sconn->smb1.notify_mid_maps, map);
(SEC_ACE_FLAG_OBJECT_INHERIT|SEC_ACE_FLAG_CONTAINER_INHERIT)) {
canon_ace *current_dir_ace = current_ace;
- DLIST_ADD_END(*dir_ace, current_ace, canon_ace *);
+ DLIST_ADD_END(*dir_ace, current_ace);
/*
* Note if this was an allow ace. We can't process
*/
if (current_ace && !(psa->flags & SEC_ACE_FLAG_INHERIT_ONLY)) {
- DLIST_ADD_END(*file_ace, current_ace, canon_ace *);
+ DLIST_ADD_END(*file_ace, current_ace);
/*
* Note if this was an allow ace. We can't process
}
#endif
- DLIST_ADD_END(req->sconn->deferred_open_queue, msg,
- struct pending_message_list *);
+ DLIST_ADD_END(req->sconn->deferred_open_queue, msg);
DEBUG(10,("push_message: pushed message length %u on "
"deferred_open_queue\n", (unsigned int)msg_len));
}
/* for now we only have one connection */
- DLIST_ADD_END(client->connections, xconn, NULL);
+ DLIST_ADD_END(client->connections, xconn);
xconn->client = client;
talloc_steal(client, xconn);
}
tevent_fd_set_close_fn(s->fde, smbd_open_socket_close_fn);
- DLIST_ADD_END(parent->sockets, s, struct smbd_open_socket *);
+ DLIST_ADD_END(parent->sockets, s);
return true;
}
return NT_STATUS_INVALID_PARAMETER_MIX;
}
- DLIST_ADD_END(xconn->smb2.requests, req, struct smbd_smb2_request *);
+ DLIST_ADD_END(xconn->smb2.requests, req);
return NT_STATUS_OK;
}
nreq->queue_entry.mem_ctx = nreq;
nreq->queue_entry.vector = nreq->out.vector;
nreq->queue_entry.count = nreq->out.vector_count;
- DLIST_ADD_END(xconn->smb2.send_queue, &nreq->queue_entry, NULL);
+ DLIST_ADD_END(xconn->smb2.send_queue, &nreq->queue_entry);
xconn->smb2.send_queue_len++;
status = smbd_smb2_flush_send_queue(xconn);
state->queue_entry.mem_ctx = state;
state->queue_entry.vector = state->vector;
state->queue_entry.count = ARRAY_SIZE(state->vector);
- DLIST_ADD_END(xconn->smb2.send_queue, &state->queue_entry, NULL);
+ DLIST_ADD_END(xconn->smb2.send_queue, &state->queue_entry);
xconn->smb2.send_queue_len++;
status = smbd_smb2_flush_send_queue(xconn);
req->queue_entry.mem_ctx = req;
req->queue_entry.vector = req->out.vector;
req->queue_entry.count = req->out.vector_count;
- DLIST_ADD_END(xconn->smb2.send_queue, &req->queue_entry, NULL);
+ DLIST_ADD_END(xconn->smb2.send_queue, &req->queue_entry);
xconn->smb2.send_queue_len++;
status = smbd_smb2_flush_send_queue(xconn);
state->queue_entry.mem_ctx = state;
state->queue_entry.vector = state->vector;
state->queue_entry.count = ARRAY_SIZE(state->vector);
- DLIST_ADD_END(xconn->smb2.send_queue, &state->queue_entry, NULL);
+ DLIST_ADD_END(xconn->smb2.send_queue, &state->queue_entry);
xconn->smb2.send_queue_len++;
status = smbd_smb2_flush_send_queue(xconn);
}
talloc_set_destructor(a, smbXsrv_session_auth0_destructor);
- DLIST_ADD_END(session->pending_auth, a, NULL);
+ DLIST_ADD_END(session->pending_auth, a);
*_a = a;
return NT_STATUS_OK;
"= %u\n", (unsigned int)*pea_total_len, dos_ea_name,
(unsigned int)listp->ea.value.length));
- DLIST_ADD_END(ea_list_head, listp, struct ea_list *);
+ DLIST_ADD_END(ea_list_head, listp);
}
}
offset += (namelen + 1); /* Go past the name + terminating zero. */
- DLIST_ADD_END(ea_list_head, eal, struct ea_list *);
+ DLIST_ADD_END(ea_list_head, eal);
DEBUG(10,("read_ea_name_list: read ea name %s\n", eal->ea.name));
}
return NULL;
}
- DLIST_ADD_END(ea_list_head, eal, struct ea_list *);
+ DLIST_ADD_END(ea_list_head, eal);
offset += bytes_used;
}
}
/* Link to domain list */
- DLIST_ADD_END(_domain_list, domain, struct winbindd_domain *);
+ DLIST_ADD_END(_domain_list, domain);
wcache_tdc_add_domain( domain );
}
method->auth_ctx = ctx;
method->depth = i;
- DLIST_ADD_END(ctx->methods, method, struct auth_method_context *);
+ DLIST_ADD_END(ctx->methods, method);
}
ctx->check_ntlm_password = auth_check_password_wrapper;
talloc_free(z);
continue;
}
- DLIST_ADD_END(new_list, z, NULL);
+ DLIST_ADD_END(new_list, z);
}
*zones_ret = new_list;
return status;
}
- DLIST_ADD_END(table->domains, d, NULL);
+ DLIST_ADD_END(table->domains, d);
if (d->tdo->trust_attributes & LSA_TRUST_ATTRIBUTE_FOREST_TRANSITIVE) {
struct ForestTrustInfo *fti = NULL;
nc_list_elem = talloc_zero(mem_ctx, struct ncList);
W_ERROR_HAVE_NO_MEMORY(nc_list_elem);
nc_list_elem->dn = nc_dn;
- DLIST_ADD_END(*nc_list, nc_list_elem, struct ncList*);
+ DLIST_ADD_END(*nc_list, nc_list_elem);
} else {
/* ncs := getNCs() from ldb database.
* getNCs() must return an array containing
op->replica_flags = replica_flags;
op->schedule_time = time(NULL);
- DLIST_ADD_END(service->ops.notifies, op, struct dreplsrv_notify_operation *);
+ DLIST_ADD_END(service->ops.notifies, op);
talloc_steal(service, op);
return WERR_OK;
}
op->cb_data = cb_data;
op->schedule_time = time(NULL);
- DLIST_ADD_END(s->ops.pending, op, struct dreplsrv_out_operation *);
+ DLIST_ADD_END(s->ops.pending, op);
return WERR_OK;
}
return ntstatus_to_werror(nt_status);
}
- DLIST_ADD_END(s->connections, conn, struct dreplsrv_out_connection *);
+ DLIST_ADD_END(s->connections, conn);
DEBUG(4,("dreplsrv_out_connection_attach(%s): create\n", hostname));
} else {
}
}
- DLIST_ADD_END(*listp, source, struct dreplsrv_partition_source_dsa *);
+ DLIST_ADD_END(*listp, source);
return WERR_OK;
}
}
schema_list_item->obj = cur;
- DLIST_ADD_END(schema_list, schema_list_item, struct schema_list);
+ DLIST_ADD_END(schema_list, schema_list_item);
}
/* resolve objects until all are resolved and in local schema */
}
if (parent_change != NULL) {
- DLIST_ADD_END(parent_change->children, c, NULL);
+ DLIST_ADD_END(parent_change->children, c);
} else {
- DLIST_ADD_END(descriptor_private->changes, c, NULL);
+ DLIST_ADD_END(descriptor_private->changes, c);
}
return ldb_module_done(req, NULL, NULL, LDB_SUCCESS);
/* Do deletes before adds */
if (op == LA_OP_ADD) {
- DLIST_ADD_END(ac->ops, os, struct la_op_store *);
+ DLIST_ADD_END(ac->ops, os);
} else {
/* By adding to the head of the list, we do deletes before
* adds when processing a replace */
item->do_delete = do_delete;
talloc_free(res);
- DLIST_ADD_END(data->changed_dns, item, struct dn_list *);
+ DLIST_ADD_END(data->changed_dns, item);
return LDB_SUCCESS;
}
item->do_delete = do_delete;
talloc_free(res);
- DLIST_ADD_END(data->changed_dns, item, struct dn_list *);
+ DLIST_ADD_END(data->changed_dns, item);
return LDB_SUCCESS;
}
/* Don't add top to list, we will do that later */
if (ldb_attr_cmp("top", current->objectclass->lDAPDisplayName) != 0) {
- DLIST_ADD_END(unsorted, current, struct class_list *);
+ DLIST_ADD_END(unsorted, current);
}
}
/* Add top here, to prevent duplicates */
current = talloc(tmp_mem_ctx, struct class_list);
current->objectclass = dsdb_class_by_lDAPDisplayName(schema, "top");
- DLIST_ADD_END(sorted, current, struct class_list *);
+ DLIST_ADD_END(sorted, current);
/* For each object: find parent chain */
for (current = unsorted; current != NULL; current = current->next) {
new_parent = talloc(tmp_mem_ctx, struct class_list);
new_parent->objectclass = dsdb_class_by_lDAPDisplayName(schema, current->objectclass->subClassOf);
- DLIST_ADD_END(unsorted, new_parent, struct class_list *);
+ DLIST_ADD_END(unsorted, new_parent);
}
/* For each object: order by hierarchy */
if (current_lowest != NULL) {
DLIST_REMOVE(unsorted,current_lowest);
- DLIST_ADD_END(sorted,current_lowest, struct class_list *);
+ DLIST_ADD_END(sorted,current_lowest);
}
}
void ldapsrv_queue_reply(struct ldapsrv_call *call, struct ldapsrv_reply *reply)
{
- DLIST_ADD_END(call->replies, reply, struct ldapsrv_reply *);
+ DLIST_ADD_END(call->replies, reply);
}
static NTSTATUS ldapsrv_unwilling(struct ldapsrv_call *call, int error)
h = talloc(mem_ctx, struct http_header);
h->key = talloc_strdup(h, key);
h->value = talloc_strdup(h, value);
- DLIST_ADD_END(*headers, h, NULL);
+ DLIST_ADD_END(*headers, h);
tail = DLIST_TAIL(*headers);
if (tail != h) {
DEBUG(0, ("%s: Error adding header\n", __func__));
this needs to be a ADD_END, as some tests (such as the
spoolss notify test) depend on the interfaces ordering
*/
- DLIST_ADD_END(*interfaces, iface, NULL);
+ DLIST_ADD_END(*interfaces, iface);
}
/**
el = talloc(pc, struct send_element);
NT_STATUS_HAVE_NO_MEMORY(el);
- DLIST_ADD_END(pc->send_queue, el, struct send_element *);
+ DLIST_ADD_END(pc->send_queue, el);
el->blob = blob;
el->nsent = 0;
el->send_callback = send_callback;
goto failed;
}
- DLIST_ADD_END(dgmsock->send_queue, req, struct nbt_dgram_request *);
+ DLIST_ADD_END(dgmsock->send_queue, req);
TEVENT_FD_WRITEABLE(dgmsock->fde);
method->send_fn = send_fn;
method->recv_fn = recv_fn;
method->privdata = userdata;
- DLIST_ADD_END(ctx->methods, method, struct resolve_method *);
+ DLIST_ADD_END(ctx->methods, method);
return true;
}
subreq->async.callback = dcerpc_bind_fail_handler;
subreq->p = p;
subreq->recv_handler = dcerpc_bind_recv_handler;
- DLIST_ADD_END(p->conn->pending, subreq, struct rpc_request *);
+ DLIST_ADD_END(p->conn->pending, subreq);
talloc_set_destructor(subreq, dcerpc_req_dequeue);
status = dcerpc_send_request(p->conn, &blob, true);
req->request_data.length = stub_data->length;
req->request_data.data = stub_data->data;
- DLIST_ADD_END(p->conn->request_queue, req, struct rpc_request *);
+ DLIST_ADD_END(p->conn->request_queue, req);
talloc_set_destructor(req, dcerpc_req_dequeue);
dcerpc_schedule_io_trigger(p->conn);
subreq->async.callback = dcerpc_alter_context_fail_handler;
subreq->p = p;
subreq->recv_handler = dcerpc_alter_context_recv_handler;
- DLIST_ADD_END(p->conn->pending, subreq, struct rpc_request *);
+ DLIST_ADD_END(p->conn->pending, subreq);
talloc_set_destructor(subreq, dcerpc_req_dequeue);
status = dcerpc_send_request(p->conn, &blob, true);
iname->registration_time = timeval_zero();
iname->wins_server = NULL;
- DLIST_ADD_END(iface->names, iname, struct nbtd_iface_name *);
+ DLIST_ADD_END(iface->names, iname);
if (nb_flags & NBT_NM_PERMANENT) {
/* permanent names are not announced and are immediately active */
s->io.in.addresses = winsdb_addr_string_list(s, rec->addresses);
if (s->io.in.addresses == NULL) goto failed;
- DLIST_ADD_END(iface->wack_queue, s, struct nbtd_wins_wack_state *);
+ DLIST_ADD_END(iface->wack_queue, s);
talloc_set_destructor(s, nbtd_wins_wack_state_destructor);
return NT_STATUS_INTERNAL_ERROR;
}
ntvfs->depth = i;
- DLIST_ADD_END(ctx->modules, ntvfs, struct ntvfs_module_context *);
+ DLIST_ADD_END(ctx->modules, ntvfs);
}
if (!ctx->modules) {
NT_STATUS_HAVE_NO_MEMORY(pending->req);
pending->info = info;
- DLIST_ADD_END(f->notify_buffer->pending, pending, struct notify_pending *);
+ DLIST_ADD_END(f->notify_buffer->pending, pending);
/* if the buffer is empty then start waiting */
if (f->notify_buffer->num_changes == 0 &&
case DCESRV_LIST_NONE:
break;
case DCESRV_LIST_CALL_LIST:
- DLIST_ADD_END(call->conn->call_list, call, struct dcesrv_call_state *);
+ DLIST_ADD_END(call->conn->call_list, call);
break;
case DCESRV_LIST_FRAGMENTED_CALL_LIST:
- DLIST_ADD_END(call->conn->incoming_fragmented_call_list, call, struct dcesrv_call_state *);
+ DLIST_ADD_END(call->conn->incoming_fragmented_call_list, call);
break;
case DCESRV_LIST_PENDING_CALL_LIST:
- DLIST_ADD_END(call->conn->pending_call_list, call, struct dcesrv_call_state *);
+ DLIST_ADD_END(call->conn->pending_call_list, call);
break;
}
}
dcerpc_set_frag_length(&rep->blob, rep->blob.length);
- DLIST_ADD_END(call->replies, rep, struct data_blob_list_item *);
+ DLIST_ADD_END(call->replies, rep);
dcesrv_call_set_list(call, DCESRV_LIST_CALL_LIST);
if (call->conn->call_list && call->conn->call_list->replies) {
dcerpc_set_frag_length(&rep->blob, rep->blob.length);
- DLIST_ADD_END(call->replies, rep, struct data_blob_list_item *);
+ DLIST_ADD_END(call->replies, rep);
stub.data += length;
stub.length -= length;
case DCESRV_LIST_NONE:
break;
case DCESRV_LIST_CALL_LIST:
- DLIST_ADD_END(call->conn->call_list, call, struct dcesrv_call_state *);
+ DLIST_ADD_END(call->conn->call_list, call);
break;
case DCESRV_LIST_FRAGMENTED_CALL_LIST:
- DLIST_ADD_END(call->conn->incoming_fragmented_call_list, call, struct dcesrv_call_state *);
+ DLIST_ADD_END(call->conn->incoming_fragmented_call_list, call);
break;
case DCESRV_LIST_PENDING_CALL_LIST:
- DLIST_ADD_END(call->conn->pending_call_list, call, struct dcesrv_call_state *);
+ DLIST_ADD_END(call->conn->pending_call_list, call);
break;
}
}
dcerpc_set_frag_length(&rep->blob, rep->blob.length);
- DLIST_ADD_END(call->replies, rep, struct data_blob_list_item *);
+ DLIST_ADD_END(call->replies, rep);
dcesrv_call_set_list(call, DCESRV_LIST_CALL_LIST);
if (call->conn->call_list && call->conn->call_list->replies) {
dcerpc_set_frag_length(&rep->blob, rep->blob.length);
- DLIST_ADD_END(call->replies, rep, struct data_blob_list_item *);
+ DLIST_ADD_END(call->replies, rep);
dcesrv_call_set_list(call, DCESRV_LIST_CALL_LIST);
if (call->conn->call_list && call->conn->call_list->replies) {
dcerpc_set_frag_length(&rep->blob, rep->blob.length);
- DLIST_ADD_END(call->replies, rep, struct data_blob_list_item *);
+ DLIST_ADD_END(call->replies, rep);
dcesrv_call_set_list(call, DCESRV_LIST_CALL_LIST);
if (call->conn->call_list && call->conn->call_list->replies) {
if (dce_conn->terminate == NULL) {
dce_conn->terminate = "dcesrv: defered terminating connection - no memory";
}
- DLIST_ADD_END(dce_ctx->broken_connections, dce_conn, NULL);
+ DLIST_ADD_END(dce_ctx->broken_connections, dce_conn);
}
static void dcesrv_cleanup_broken_connections(struct dcesrv_context *dce_ctx)
if (z->zoneinfo == NULL) {
continue;
}
- DLIST_ADD_END(new_list, z, NULL);
+ DLIST_ADD_END(new_list, z);
p->zones_count++;
dsstate->zones_count++;
} else {
/* Existing zone */
talloc_free(z);
DLIST_REMOVE(old_list, zmatch);
- DLIST_ADD_END(new_list, zmatch, NULL);
+ DLIST_ADD_END(new_list, zmatch);
}
z = znext;
}
if (z->zoneinfo == NULL) {
goto failed;
}
- DLIST_ADD_END(dsstate->zones, z, NULL);
+ DLIST_ADD_END(dsstate->zones, z);
p->zones_count++;
dsstate->zones_count++;
} else {
p->dwDpFlags = DNS_DP_AUTOCREATED | DNS_DP_DOMAIN_DEFAULT | DNS_DP_ENLISTED;
p->is_forest = false;
- DLIST_ADD_END(partitions, p, NULL);
+ DLIST_ADD_END(partitions, p);
/* Forest Partition */
p = talloc_zero(mem_ctx, struct dnsserver_partition);
p->dwDpFlags = DNS_DP_AUTOCREATED | DNS_DP_FOREST_DEFAULT | DNS_DP_ENLISTED;
p->is_forest = true;
- DLIST_ADD_END(partitions, p, NULL);
+ DLIST_ADD_END(partitions, p);
return partitions;
}
z->zone_dn = talloc_steal(z, res->msgs[i]->dn);
- DLIST_ADD_END(zones, z, NULL);
+ DLIST_ADD_END(zones, z);
DEBUG(2, ("dnsserver: Found DNS zone %s\n", z->name));
}
return NT_STATUS_INSUFFICIENT_RESOURCES;
}
- DLIST_ADD_END(req->smb_conn->requests2.list, req, struct smb2srv_request *);
+ DLIST_ADD_END(req->smb_conn->requests2.list, req);
req->pending_id = id;
talloc_set_destructor(req, smb2srv_request_deny_destructor);
#define SMBSRV_CALL_NTVFS_BACKEND(cmd) do { \
req->ntvfs->async_states->status = cmd; \
if (req->ntvfs->async_states->state & NTVFS_ASYNC_STATE_ASYNC) { \
- DLIST_ADD_END(req->smb_conn->requests, req, struct smbsrv_request *); \
+ DLIST_ADD_END(req->smb_conn->requests, req); \
} else { \
req->ntvfs->async_states->send_fn(req->ntvfs); \
} \
NT_STATUS_HAVE_NO_MEMORY(srv);
srv->service_name = name;
srv->task_init = task_init;
- DLIST_ADD_END(registered_servers, srv, struct registered_server *);
+ DLIST_ADD_END(registered_servers, srv);
return NT_STATUS_OK;
}
ok = test_fsrvp_state_smap(tctx, sc, "base_share", "sc_share", &smap);
torture_assert(tctx, ok, "failed to create smap");
- DLIST_ADD_END(fss_gs.sc_sets, sc_set, struct fss_sc_set *);
+ DLIST_ADD_END(fss_gs.sc_sets, sc_set);
fss_gs.sc_sets_count++;
- DLIST_ADD_END(sc_set->scs, sc, struct fss_sc *);
+ DLIST_ADD_END(sc_set->scs, sc);
sc_set->scs_count++;
sc->sc_set = sc_set;
- DLIST_ADD_END(sc->smaps, smap, struct fss_sc_smap *);
+ DLIST_ADD_END(sc->smaps, smap);
sc->smaps_count++;
status = fss_state_store(fss_gs.mem_ctx, fss_gs.sc_sets,
&smap_abb);
torture_assert(tctx, ok, "failed to create smap");
- DLIST_ADD_END(fss_gs.sc_sets, sc_set_a, struct fss_sc_set *);
+ DLIST_ADD_END(fss_gs.sc_sets, sc_set_a);
fss_gs.sc_sets_count++;
- DLIST_ADD_END(fss_gs.sc_sets, sc_set_b, struct fss_sc_set *);
+ DLIST_ADD_END(fss_gs.sc_sets, sc_set_b);
fss_gs.sc_sets_count++;
- DLIST_ADD_END(sc_set_a->scs, sc_aa, struct fss_sc *);
+ DLIST_ADD_END(sc_set_a->scs, sc_aa);
sc_set_a->scs_count++;
sc_aa->sc_set = sc_set_a;
- DLIST_ADD_END(sc_set_a->scs, sc_ab, struct fss_sc *);
+ DLIST_ADD_END(sc_set_a->scs, sc_ab);
sc_set_a->scs_count++;
sc_ab->sc_set = sc_set_a;
- DLIST_ADD_END(sc_aa->smaps, smap_aaa, struct fss_sc_smap *);
+ DLIST_ADD_END(sc_aa->smaps, smap_aaa);
sc_aa->smaps_count++;
- DLIST_ADD_END(sc_ab->smaps, smap_aba, struct fss_sc_smap *);
+ DLIST_ADD_END(sc_ab->smaps, smap_aba);
sc_ab->smaps_count++;
- DLIST_ADD_END(sc_ab->smaps, smap_abb, struct fss_sc_smap *);
+ DLIST_ADD_END(sc_ab->smaps, smap_abb);
sc_ab->smaps_count++;
status = fss_state_store(fss_gs.mem_ctx, fss_gs.sc_sets,
f = talloc (NULL, struct ftable);
f->locks = NULL;
nb_set_createx_params(f, fname, create_options, create_disposition, handle);
- DLIST_ADD_END(ftable, f, struct ftable *);
+ DLIST_ADD_END(ftable, f);
}
f->handle = handle;
linfo = talloc (f, struct lock_info);
linfo->offset = offset;
linfo->size = size;
- DLIST_ADD_END(f->locks, linfo, struct lock_info *);
+ DLIST_ADD_END(f->locks, linfo);
}
return true;
* and not handle it as new request
*/
req->state = NBT_REQUEST_SEND;
- DLIST_ADD_END(nbtsock->send_queue, req,
- struct nbt_name_request *);
+ DLIST_ADD_END(nbtsock->send_queue, req);
TEVENT_FD_WRITEABLE(nbtsock->fde);
break;
}
test->fn = check_fn;
test->dangerous = false;
- DLIST_ADD_END(tcase->tests, test, struct torture_test *);
+ DLIST_ADD_END(tcase->tests, test);
return test;
}
test->fn = check_fn;
test->dangerous = false;
- DLIST_ADD_END(tcase->tests, test, struct torture_test *);
+ DLIST_ADD_END(tcase->tests, test);
return test;
}
rp->opnum = opnum;
rp->r = talloc_reference(rp, r);
- DLIST_ADD_END(received_packets, rp, struct received_packet *);
+ DLIST_ADD_END(received_packets, rp);
switch (opnum) {
case 58: {
test->fn = run;
test->dangerous = false;
- DLIST_ADD_END(tcase->tests, test, struct torture_test *);
+ DLIST_ADD_END(tcase->tests, test);
return test;
}
test->fn = run;
test->dangerous = false;
- DLIST_ADD_END(tcase->tests, test, struct torture_test *);
+ DLIST_ADD_END(tcase->tests, test);
return test;
}
test->fn = run;
test->dangerous = false;
- DLIST_ADD_END(tcase->tests, test, struct torture_test *);
+ DLIST_ADD_END(tcase->tests, test);
return test;
test->fn = run;
test->dangerous = false;
- DLIST_ADD_END(tcase->tests, test, struct torture_test *);
+ DLIST_ADD_END(tcase->tests, test);
return test;
test->fn = run;
test->dangerous = false;
- DLIST_ADD_END(tcase->tests, test, struct torture_test *);
+ DLIST_ADD_END(tcase->tests, test);
return test;
}
test->fn = run;
test->dangerous = false;
- DLIST_ADD_END(tcase->tests, test, struct torture_test *);
+ DLIST_ADD_END(tcase->tests, test);
return test;
}
partner->address = address;
talloc_steal(partner, partner->address);
- DLIST_ADD_END(service->partners, partner, struct wreplsrv_partner *);
+ DLIST_ADD_END(service->partners, partner);
}
partner->name = ldb_msg_find_attr_as_string(res->msgs[i], "name", partner->address);
cur->partner = wreplsrv_find_partner(service, wins_owner);
- DLIST_ADD_END(table, cur, struct wreplsrv_owner *);
+ DLIST_ADD_END(table, cur);
*_table = table;
}