您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ DLIST_REMOVE函数代码示例

51自学网 2021-06-01 20:22:19
  C++
这篇教程C++ DLIST_REMOVE函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中DLIST_REMOVE函数的典型用法代码示例。如果您正苦于以下问题:C++ DLIST_REMOVE函数的具体用法?C++ DLIST_REMOVE怎么用?C++ DLIST_REMOVE使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了DLIST_REMOVE函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: Logoff

/**   /details Logoff an Exchange store   This function uninitializes the MAPI session associated to the   object.   /param obj_store pointer to the store object   /return MAPI_E_SUCCESS on success, otherwise MAPI_E_NOT_FOUND */_PUBLIC_ enum MAPISTATUS Logoff(mapi_object_t *obj_store){    struct mapi_context	*mapi_ctx;    struct mapi_session	*session;    struct mapi_session	*el;    bool			found = false;    /* Sanity checks */    session = mapi_object_get_session(obj_store);    OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);    mapi_ctx = session->mapi_ctx;    OPENCHANGE_RETVAL_IF(!mapi_ctx, MAPI_E_NOT_INITIALIZED, NULL);    for (el = mapi_ctx->session; el; el = el->next) {        if (session == el) {            found = true;            mapi_object_release(obj_store);            DLIST_REMOVE(mapi_ctx->session, el);            MAPIFreeBuffer(session);            break;        }    }    return (found == true) ? MAPI_E_SUCCESS : MAPI_E_NOT_FOUND;}
开发者ID:proxymoron,项目名称:openchange,代码行数:36,


示例2: wrepl_socket_dead

/*  mark all pending requests as dead - called when a socket error happens*/static void wrepl_socket_dead(struct wrepl_socket *wrepl_socket, NTSTATUS status){	wrepl_socket->dead = True;	if (wrepl_socket->packet) {		packet_recv_disable(wrepl_socket->packet);		packet_set_fde(wrepl_socket->packet, NULL);		packet_set_socket(wrepl_socket->packet, NULL);	}	if (wrepl_socket->event.fde) {		talloc_free(wrepl_socket->event.fde);		wrepl_socket->event.fde = NULL;	}	if (wrepl_socket->sock) {		talloc_free(wrepl_socket->sock);		wrepl_socket->sock = NULL;	}	if (NT_STATUS_EQUAL(NT_STATUS_UNSUCCESSFUL, status)) {		status = NT_STATUS_UNEXPECTED_NETWORK_ERROR;	}	while (wrepl_socket->recv_queue) {		struct wrepl_request *req = wrepl_socket->recv_queue;		DLIST_REMOVE(wrepl_socket->recv_queue, req);		wrepl_request_finished(req, status);	}	talloc_set_destructor(wrepl_socket, NULL);	if (wrepl_socket->free_skipped) {		talloc_free(wrepl_socket);	}}
开发者ID:Marvin-Lee,项目名称:libwmiclient,代码行数:37,


示例3: tevent_signal_destructor

/*  destroy a signal event*/static int tevent_signal_destructor(struct tevent_signal *se){	struct tevent_common_signal_list *sl;	sl = talloc_get_type(se->additional_data,			     struct tevent_common_signal_list);	if (se->event_ctx) {		DLIST_REMOVE(se->event_ctx->signal_events, se);	}	talloc_free(sl);	if (sig_state->sig_handlers[se->signum] == NULL) {		/* restore old handler, if any */		if (sig_state->oldact[se->signum]) {			sigaction(se->signum, sig_state->oldact[se->signum], NULL);			sig_state->oldact[se->signum] = NULL;		}#ifdef SA_SIGINFO		if (se->sa_flags & SA_SIGINFO) {			if (sig_state->sig_info[se->signum]) {				talloc_free(sig_state->sig_info[se->signum]);				sig_state->sig_info[se->signum] = NULL;			}		}#endif	}	return 0;}
开发者ID:AIdrifter,项目名称:samba,代码行数:33,


示例4: process_blocking_lock_cancel_message

static void process_blocking_lock_cancel_message(struct messaging_context *ctx,						 void *private_data,						 uint32_t msg_type,						 struct server_id server_id,						 DATA_BLOB *data){	NTSTATUS err;	const char *msg = (const char *)data->data;	struct blocking_lock_record *blr;	if (data->data == NULL) {		smb_panic("process_blocking_lock_cancel_message: null msg");	}	if (data->length != MSG_BLOCKING_LOCK_CANCEL_SIZE) {		DEBUG(0, ("process_blocking_lock_cancel_message: "			  "Got invalid msg len %d/n", (int)data->length));		smb_panic("process_blocking_lock_cancel_message: bad msg");        }	memcpy(&blr, msg, sizeof(blr));	memcpy(&err, &msg[sizeof(blr)], sizeof(NTSTATUS));	DEBUG(10,("process_blocking_lock_cancel_message: returning error %s/n",		nt_errstr(err) ));	blocking_lock_reply_error(blr, err);	DLIST_REMOVE(blocking_lock_cancelled_queue, blr);	TALLOC_FREE(blr);}
开发者ID:0x24bin,项目名称:winexe-1,代码行数:30,


示例5: svfs_close

/*  close a file*/static NTSTATUS svfs_close(struct ntvfs_module_context *ntvfs,			   struct ntvfs_request *req,			   union smb_close *io){	struct svfs_private *p = ntvfs->private_data;	struct svfs_file *f;	if (io->generic.level != RAW_CLOSE_CLOSE) {		/* we need a mapping function */		return NT_STATUS_INVALID_LEVEL;	}	f = find_fd(p, io->close.in.file.ntvfs);	if (!f) {		return NT_STATUS_INVALID_HANDLE;	}	if (close(f->fd) == -1) {		return map_nt_error_from_unix(errno);	}	DLIST_REMOVE(p->open_files, f);	talloc_free(f->name);	talloc_free(f);	return NT_STATUS_OK;}
开发者ID:Alexandr-Galko,项目名称:samba,代码行数:30,


示例6: tevent_common_signal_list_destructor

static int tevent_common_signal_list_destructor(struct tevent_common_signal_list *sl){	if (sig_state->sig_handlers[sl->se->signum]) {		DLIST_REMOVE(sig_state->sig_handlers[sl->se->signum], sl);	}	return 0;}
开发者ID:AIdrifter,项目名称:samba,代码行数:7,


示例7: elog_close_tdb

int elog_close_tdb( ELOG_TDB *etdb, bool force_close ){	TDB_CONTEXT *tdb;	if ( !etdb )		return 0;	etdb->ref_count--;	SMB_ASSERT( etdb->ref_count >= 0 );	if ( etdb->ref_count == 0 ) {		tdb = etdb->tdb;		DLIST_REMOVE( open_elog_list, etdb );		TALLOC_FREE( etdb );		return tdb_close( tdb );	}	if ( force_close ) {		tdb = etdb->tdb;		etdb->tdb = NULL;		return tdb_close( tdb );	}	return 0;}
开发者ID:endisd,项目名称:samba,代码行数:26,


示例8: fsp_free

void fsp_free(files_struct *fsp){	struct smbd_server_connection *sconn = fsp->conn->sconn;	DLIST_REMOVE(sconn->files, fsp);	SMB_ASSERT(sconn->num_files > 0);	sconn->num_files--;	TALLOC_FREE(fsp->fake_file_handle);	if (fsp->fh->ref_count == 1) {		TALLOC_FREE(fsp->fh);	} else {		fsp->fh->ref_count--;	}	fsp->conn->num_files_open--;	/* this is paranoia, just in case someone tries to reuse the	   information */	ZERO_STRUCTP(fsp);	/* fsp->fsp_name is a talloc child and is free'd automatically. */	TALLOC_FREE(fsp);}
开发者ID:andrew-aladev,项目名称:samba-talloc-debug,代码行数:25,


示例9: srv_epmapper_delete_endpoints

bool srv_epmapper_delete_endpoints(struct pipes_struct *p){	struct epm_Delete r;	struct dcesrv_ep_entry_list *el = p->ep_entries;	error_status_t result;	while (el) {		struct dcesrv_ep_entry_list *next = el->next;		r.in.num_ents = el->num_ents;		r.in.entries = el->entries;		DEBUG(10, ("Delete_endpoints for: %s/n",			   el->entries[0].annotation));		result = _epm_Delete(p, &r);		if (result != EPMAPPER_STATUS_OK) {			return false;		}		DLIST_REMOVE(p->ep_entries, el);		TALLOC_FREE(el);		el = next;	}	return true;}
开发者ID:themiron,项目名称:asuswrt-merlin,代码行数:28,


示例10: query_one_hostname

void query_one_hostname(){	smb_srv_info_t *p;	for (p = smb_srv_info_list; p; p = p->next) {		if(strcmp(p->name->ptr, "")!=0){			continue;		}		if(p->id==0){			Cdbg(DBE, "query_one_hostname [%s]/n", p->ip->ptr);			//continue;		}		char* hostname = smbc_nmblookup(p->ip->ptr);				if(hostname==NULL){			//Cdbg(DBE, "/t/tCan't query samba server name[%s]/n", p->ip->ptr);			buffer_free(p->ip);			buffer_free(p->mac);			buffer_free(p->name);						DLIST_REMOVE(smb_srv_info_list, p);			free(p);		}		else{			buffer_copy_string(p->name, hostname);		}	}}
开发者ID:heartshare,项目名称:asuswrt-merlin,代码行数:30,


示例11: SMBC_remove_unused_server

/*  * Remove a server from the cached server list it's unused. * On success, 0 is returned. 1 is returned if the server could not be removed. *  * Also useable outside libsmbclient */intSMBC_remove_unused_server(SMBCCTX * context,                          SMBCSRV * srv){	SMBCFILE * file;	/* are we being fooled ? */	if (!context || !context->internal->initialized || !srv) {                return 1;        }	/* Check all open files/directories for a relation with this server */	for (file = context->internal->files; file; file = file->next) {		if (file->srv == srv) {			/* Still used */			DEBUG(3, ("smbc_remove_usused_server: "                                  "%p still used by %p./n",				  srv, file));			return 1;		}	}	DLIST_REMOVE(context->internal->servers, srv);	cli_shutdown(srv->cli);	srv->cli = NULL;	DEBUG(3, ("smbc_remove_usused_server: %p removed./n", srv));	smbc_getFunctionRemoveCachedServer(context)(context, srv);        SAFE_FREE(srv);	return 0;}
开发者ID:ebrainte,项目名称:Samba,代码行数:40,


示例12: invalidate_vuid

void invalidate_vuid(uint16 vuid){	user_struct *vuser = get_valid_user_struct(vuid);	if (vuser == NULL)		return;		SAFE_FREE(vuser->homedir);	SAFE_FREE(vuser->unix_homedir);	SAFE_FREE(vuser->logon_script);		session_yield(vuser);	SAFE_FREE(vuser->session_keystr);	free_server_info(&vuser->server_info);	data_blob_free(&vuser->session_key);	DLIST_REMOVE(validated_users, vuser);	/* clear the vuid from the 'cache' on each connection, and	   from the vuid 'owner' of connections */	conn_clear_vuid_cache(vuid);	SAFE_FREE(vuser->groups);	delete_nt_token(&vuser->nt_user_token);	SAFE_FREE(vuser);	num_validated_vuids--;}
开发者ID:Nymphetaminer,项目名称:dsl-n55u,代码行数:29,


示例13: remove_child_pid

static void remove_child_pid(struct smbd_parent_context *parent,			     pid_t pid,			     bool unclean_shutdown){	struct smbd_child_pid *child;	struct server_id child_id;	int ret;	child_id = pid_to_procid(pid);	ret = messaging_cleanup(parent->msg_ctx, pid);	if ((ret != 0) && (ret != ENOENT)) {		DEBUG(10, ("%s: messaging_cleanup returned %s/n",			   __func__, strerror(ret)));	}	smbprofile_cleanup(pid);	for (child = parent->children; child != NULL; child = child->next) {		if (child->pid == pid) {			struct smbd_child_pid *tmp = child;			DLIST_REMOVE(parent->children, child);			TALLOC_FREE(tmp);			parent->num_children -= 1;			break;		}	}	if (child == NULL) {		/* not all forked child processes are added to the children list */		DEBUG(2, ("Could not find child %d -- ignoring/n", (int)pid));		return;	}	if (unclean_shutdown) {		/* a child terminated uncleanly so tickle all		   processes to see if they can grab any of the		   pending locks                */		DEBUG(3,(__location__ " Unclean shutdown of pid %u/n",			(unsigned int)pid));		if (parent->cleanup_te == NULL) {			/* call the cleanup timer, but not too often */			int cleanup_time = lp_parm_int(-1, "smbd", "cleanuptime", 20);			parent->cleanup_te = tevent_add_timer(parent->ev_ctx,						parent,						timeval_current_ofs(cleanup_time, 0),						cleanup_timeout_fn,						parent);			DEBUG(1,("Scheduled cleanup of brl and lock database after unclean shutdown/n"));		}	}	if (!serverid_deregister(child_id)) {		DEBUG(1, ("Could not remove pid %d from serverid.tdb/n",			  (int)pid));	}}
开发者ID:aoa141,项目名称:samba,代码行数:59,


示例14: smb2srv_request_destructor

static int smb2srv_request_destructor(struct smb2srv_request *req){	DLIST_REMOVE(req->smb_conn->requests2.list, req);	if (req->pending_id) {		idr_remove(req->smb_conn->requests2.idtree_req, req->pending_id);	}	return 0;}
开发者ID:srimalik,项目名称:samba,代码行数:8,


示例15: wrepl_request_destructor

/*  destroy a wrepl_request*/static int wrepl_request_destructor(struct wrepl_request *req){    if (req->state == WREPL_REQUEST_RECV) {        DLIST_REMOVE(req->wrepl_socket->recv_queue, req);    }    req->state = WREPL_REQUEST_ERROR;    return 0;}
开发者ID:gojdic,项目名称:samba,代码行数:11,


示例16: ibw_conn_destruct

static int ibw_conn_destruct(struct ibw_conn *conn){	DEBUG(DEBUG_DEBUG, ("ibw_conn_destruct(%p)/n", conn));		/* important here: ctx is a talloc _parent_ */	DLIST_REMOVE(conn->ctx->conn_list, conn);	return 0;}
开发者ID:DanilKorotenko,项目名称:samba,代码行数:8,


示例17: SMBC_close_ctx

intSMBC_close_ctx(SMBCCTX *context,               SMBCFILE *file){	TALLOC_CTX *frame = talloc_stackframe();	if (!context || !context->internal->initialized) {		errno = EINVAL;		TALLOC_FREE(frame);		return -1;	}	if (!file || !SMBC_dlist_contains(context->internal->files, file)) {		errno = EBADF;		TALLOC_FREE(frame);		return -1;	}	/* IS a dir ... */	if (!file->file) {		TALLOC_FREE(frame);		return smbc_getFunctionClosedir(context)(context, file);	}	if (!NT_STATUS_IS_OK(cli_close(file->targetcli, file->cli_fd))) {		SMBCSRV *srv;		DEBUG(3, ("cli_close failed on %s. purging server./n",			  file->fname));		/* Deallocate slot and remove the server		 * from the server cache if unused */		errno = SMBC_errno(context, file->targetcli);		srv = file->srv;		DLIST_REMOVE(context->internal->files, file);		SAFE_FREE(file->fname);		SAFE_FREE(file);		smbc_getFunctionRemoveUnusedServer(context)(context, srv);		TALLOC_FREE(frame);		return -1;	}	DLIST_REMOVE(context->internal->files, file);	SAFE_FREE(file->fname);	SAFE_FREE(file);	TALLOC_FREE(frame);	return 0;}
开发者ID:Alexander--,项目名称:samba,代码行数:46,


示例18: NOTICE

void Worker::run(){    int ret;    __dlist_t head;    __dlist_t *next;    Connection *conn;    NOTICE("worker is running now.");    while (!_stopped)    {        DLIST_INIT(&head);        pthread_mutex_lock(&_mutex);        while (DLIST_EMPTY(&_queue))            pthread_cond_wait(&_cond, &_mutex);        next = DLIST_NEXT(&_queue);        DLIST_REMOVE(&_queue);        pthread_mutex_unlock(&_mutex);        DLIST_INSERT_B(&head, next);        while (!DLIST_EMPTY(&head))        {            next = DLIST_NEXT(&head);            DLIST_REMOVE(next);            conn = GET_OWNER(next, Connection, _list);            TRACE("start to process conn, sock[%d].", conn->_sock_fd);            try            {                ret = conn->on_process();                if (ret == 0)                {                    conn->_status = Connection::ST_PROCESSING_REQUEST_OK;                    TRACE("process conn ok, sock[%d].", conn->_sock_fd);                }                else                {                    conn->_status = Connection::ST_PROCESSING_REQUEST_FAIL;                    WARNING("failed to process conn, sock[%d], ret=%d.", conn->_sock_fd, ret);                }            }            catch (...)            {                WARNING("failed to process conn, sock[%d], exception catched.", conn->_sock_fd);            }            _server_manager->done(conn);        }    }    NOTICE("worker is stopped by user, exiting now.");}
开发者ID:zilongwhu,项目名称:ls-server,代码行数:46,


示例19: smbsrv_session_destructor

/****************************************************************************destroy a session structure****************************************************************************/static int smbsrv_session_destructor(struct smbsrv_session *sess){    struct smbsrv_connection *smb_conn = sess->smb_conn;    idr_remove(smb_conn->sessions.idtree_vuid, sess->vuid);    DLIST_REMOVE(smb_conn->sessions.list, sess);    return 0;}
开发者ID:gojdic,项目名称:samba,代码行数:11,


示例20: pvfs_fnum_destructor

/*  destroy a struct pvfs_file*/static int pvfs_fnum_destructor(struct pvfs_file *f){	DLIST_REMOVE(f->pvfs->files.list, f);	pvfs_lock_close(f->pvfs, f);	ntvfs_handle_remove_backend_data(f->ntvfs, f->pvfs->ntvfs);	return 0;}
开发者ID:Marvin-Lee,项目名称:libwmiclient,代码行数:11,


示例21: DLIST_SAFE_LOOP

 /* remove elements */ DLIST_SAFE_LOOP(head, in, in_safe) {     if (in->me->data > 1)     {         DLIST_REMOVE(*in);         FREE(in->me);         FREE(in);     } }
开发者ID:ZIViTi,项目名称:android_hardware_ti_omap4,代码行数:9,


示例22: opd_destructor

static int opd_destructor(struct aio_open_private_data *opd){	if (opd->dir_fd != -1) {		close(opd->dir_fd);	}	DLIST_REMOVE(open_pd_list, opd);	return 0;}
开发者ID:ebrainte,项目名称:Samba,代码行数:8,


示例23: timed_event_destructor

static int timed_event_destructor(void *p){    struct timed_event *te = talloc_get_type_abort(p, struct timed_event);    DEBUG(10, ("Destroying timed event %lx /"%s/"/n", (unsigned long)te,               te->event_name));    DLIST_REMOVE(timed_events, te);    return 0;}
开发者ID:Refection,项目名称:freestyledash,代码行数:8,


示例24: load_interfaces

/****************************************************************************load the list of network interfaces****************************************************************************/void load_interfaces(void){	char *ptr;	fstring token;	int i;	struct iface_struct ifaces[MAX_INTERFACES];	ptr = lp_interfaces();	ipzero = *interpret_addr2("0.0.0.0");	allones_ip = *interpret_addr2("255.255.255.255");	loopback_ip = *interpret_addr2("127.0.0.1");	if (probed_ifaces) {		free(probed_ifaces);		probed_ifaces = NULL;	}	/* dump the current interfaces if any */	while (local_interfaces) {		struct interface *iface = local_interfaces;		DLIST_REMOVE(local_interfaces, local_interfaces);		ZERO_STRUCTPN(iface);		free(iface);	}	/* probe the kernel for interfaces */	total_probed = get_interfaces(ifaces, MAX_INTERFACES);	if (total_probed > 0) {		probed_ifaces = memdup(ifaces, sizeof(ifaces[0])*total_probed);	}	/* if we don't have a interfaces line then use all broadcast capable 	   interfaces except loopback */	if (!ptr || !*ptr) {		if (total_probed <= 0) {			DEBUG(0,("ERROR: Could not determine network interfaces, you must use a interfaces config line/n"));			exit(1);		}		for (i=0;i<total_probed;i++) {			if (probed_ifaces[i].netmask.s_addr != allones_ip.s_addr &&			    probed_ifaces[i].ip.s_addr != loopback_ip.s_addr) {				add_interface(probed_ifaces[i].ip, 					      probed_ifaces[i].netmask);			}		}		return;	}	while (next_token(&ptr,token,NULL,sizeof(token))) {		interpret_interface(token);	}	if (!local_interfaces) {		DEBUG(0,("WARNING: no network interfaces found/n"));	}}
开发者ID:AllardJ,项目名称:Tomato,代码行数:61,


示例25: free_userlist

void free_userlist(struct sys_userlist *list_head){	while (list_head) {		struct sys_userlist *old_head = list_head;		DLIST_REMOVE(list_head, list_head);		SAFE_FREE(old_head->unix_name);		SAFE_FREE(old_head);	}}
开发者ID:Nymphetaminer,项目名称:dsl-n55u,代码行数:9,


示例26: rb_smbfile_close_and_deref_by_data

static void rb_smbfile_close_and_deref_by_data(RB_SMBFILE_DATA *data){  rb_smbfile_close_by_data(data);  data->smbcctx = NULL;  data->smbcfile = NULL;  DLIST_REMOVE(data->smb_data->smbfile_data_list, data);}
开发者ID:fumiyas,项目名称:ruby-net-smb,代码行数:9,


示例27: delete_partial_auth

static void delete_partial_auth(struct pending_auth_data *pad){	if (!pad) {		return;	}	DLIST_REMOVE(pd_list, pad);	data_blob_free(&pad->partial_data);	SAFE_FREE(pad);}
开发者ID:gittestusername,项目名称:uClinux,代码行数:9,


示例28: watch_destructor

static int watch_destructor(void *mem){    struct sbus_watch_ctx *watch;    watch = talloc_get_type(mem, struct sbus_watch_ctx);    DLIST_REMOVE(watch->conn->watch_list, watch);    return 0;}
开发者ID:AbhishekKumarSingh,项目名称:sssd,代码行数:9,


示例29: conn_free

void conn_free(connection_struct *conn){	DLIST_REMOVE(Connections, conn);	bitmap_clear(bmap, conn->cnum);	num_open--;	conn_free_internal(conn);}
开发者ID:DeezNuts12,项目名称:freestyledash,代码行数:9,



注:本文中的DLIST_REMOVE函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ DLLTEXT函数代码示例
C++ DLIST_ADD函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。