这篇教程C++ vstream_fclose函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中vstream_fclose函数的典型用法代码示例。如果您正苦于以下问题:C++ vstream_fclose函数的具体用法?C++ vstream_fclose怎么用?C++ vstream_fclose使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了vstream_fclose函数的25个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: qmgr_delivervoid qmgr_deliver(QMGR_TRANSPORT *transport, VSTREAM *stream){ QMGR_QUEUE *queue; QMGR_ENTRY *entry; /* * Find out if this delivery process is really available. Once elected, * the delivery process is supposed to express its happiness. If there is * a problem, wipe the pending deliveries for this transport. This * routine runs in response to an external event, so it does not run * while some other queue manipulation is happening. */ if (qmgr_deliver_initial_reply(stream) != 0) { qmgr_transport_throttle(transport, "mail transport unavailable"); qmgr_defer_transport(transport, transport->reason); (void) vstream_fclose(stream); return; } /* * Find a suitable queue entry. Things may have changed since this * transport was allocated. If no suitable entry is found, * unceremoniously disconnect from the delivery process. The delivery * agent request reading routine is prepared for the queue manager to * change its mind for no apparent reason. */ if ((queue = qmgr_queue_select(transport)) == 0 || (entry = qmgr_entry_select(queue)) == 0) { (void) vstream_fclose(stream); return; } /* * Send the queue file info and recipient info to the delivery process. * If there is a problem, wipe the pending deliveries for this transport. * This routine runs in response to an external event, so it does not run * while some other queue manipulation is happening. */ if (qmgr_deliver_send_request(entry, stream) < 0) { qmgr_entry_unselect(queue, entry); qmgr_transport_throttle(transport, "mail transport unavailable"); qmgr_defer_transport(transport, transport->reason); /* warning: entry and queue may be dangling pointers here */ (void) vstream_fclose(stream); return; } /* * If we get this far, go wait for the delivery status report. */ qmgr_deliver_concurrency++; entry->stream = stream; event_enable_read(vstream_fileno(stream), qmgr_deliver_update, (char *) entry); /* * Guard against broken systems. */ event_request_timer(qmgr_deliver_abort, (char *) entry, var_daemon_timeout);}
开发者ID:TonyChengTW,项目名称:Rmail,代码行数:60,
示例2: deliver_messagestatic int deliver_message(DELIVER_REQUEST *request){ const char *myname = "deliver_message"; VSTREAM *src; int result = 0; int status; RECIPIENT *rcpt; int nrcpt; DSN_SPLIT dp; DSN dsn; if (msg_verbose) msg_info("deliver_message: from %s", request->sender); /* * Sanity checks. */ if (request->nexthop[0] == 0) msg_fatal("empty nexthop hostname"); if (request->rcpt_list.len <= 0) msg_fatal("recipient count: %d", request->rcpt_list.len); /* * Open the queue file. Opening the file can fail for a variety of * reasons, such as the system running out of resources. Instead of * throwing away mail, we're raising a fatal error which forces the mail * system to back off, and retry later. */ src = mail_queue_open(request->queue_name, request->queue_id, O_RDWR, 0); if (src == 0) msg_fatal("%s: open %s %s: %m", myname, request->queue_name, request->queue_id); if (msg_verbose) msg_info("%s: file %s", myname, VSTREAM_PATH(src)); /* * Discard all recipients. */#define BOUNCE_FLAGS(request) DEL_REQ_TRACE_FLAGS(request->flags) dsn_split(&dp, "2.0.0", request->nexthop); (void) DSN_SIMPLE(&dsn, DSN_STATUS(dp.dsn), dp.text); for (nrcpt = 0; nrcpt < request->rcpt_list.len; nrcpt++) { rcpt = request->rcpt_list.info + nrcpt; status = sent(BOUNCE_FLAGS(request), request->queue_id, &request->msg_stats, rcpt, "none", &dsn); if (status == 0 && (request->flags & DEL_REQ_FLAG_SUCCESS)) deliver_completed(src, rcpt->offset); result |= status; } /* * Clean up. */ if (vstream_fclose(src)) msg_warn("close %s %s: %m", request->queue_name, request->queue_id); return (result);}
开发者ID:Jingeun,项目名称:tongsu_smtp,代码行数:60,
示例3: deliver_messagestatic int deliver_message(DELIVER_REQUEST *request){ char *myname = "deliver_message"; VSTREAM *src; int result = 0; int status; RECIPIENT *rcpt; int nrcpt; if (msg_verbose) msg_info("deliver_message: from %s", request->sender); /* * Sanity checks. */ if (request->nexthop[0] == 0) msg_fatal("empty nexthop hostname"); if (request->rcpt_list.len <= 0) msg_fatal("recipient count: %d", request->rcpt_list.len); /* * Open the queue file. Opening the file can fail for a variety of * reasons, such as the system running out of resources. Instead of * throwing away mail, we're raising a fatal error which forces the mail * system to back off, and retry later. */ src = mail_queue_open(request->queue_name, request->queue_id, O_RDWR, 0); if (src == 0) msg_fatal("%s: open %s %s: %m", myname, request->queue_name, request->queue_id); if (msg_verbose) msg_info("%s: file %s", myname, VSTREAM_PATH(src)); /* * Bounce all recipients. */#define BOUNCE_FLAGS(request) DEL_REQ_TRACE_FLAGS(request->flags) for (nrcpt = 0; nrcpt < request->rcpt_list.len; nrcpt++) { rcpt = request->rcpt_list.info + nrcpt; if (rcpt->offset >= 0) { status = bounce_append(BOUNCE_FLAGS(request), request->queue_id, rcpt->orig_addr, rcpt->address, rcpt->offset, "none", request->arrival_time, "%s", request->nexthop); if (status == 0) deliver_completed(src, rcpt->offset); result |= status; } } /* * Clean up. */ if (vstream_fclose(src)) msg_warn("close %s %s: %m", request->queue_name, request->queue_id); return (result);}
开发者ID:TonyChengTW,项目名称:Rmail,代码行数:60,
示例4: close_sessionstatic void close_session(SESSION *session){ event_disable_readwrite(vstream_fileno(session->stream)); vstream_fclose(session->stream); session->stream = 0; start_another(session);}
开发者ID:KKcorps,项目名称:postfix,代码行数:7,
示例5: load_filevoid load_file(const char *path, LOAD_FILE_FN action, void *context){ VSTREAM *fp; struct stat st; time_t before; time_t after; /* * Read the file again if it is hot. This may result in reading a partial * parameter name or missing end marker when a file changes in the middle * of a read. */ for (before = time((time_t *) 0); /* see below */ ; before = after) { if ((fp = vstream_fopen(path, O_RDONLY, 0)) == 0) msg_fatal("open %s: %m", path); action(fp, context); if (fstat(vstream_fileno(fp), &st) < 0) msg_fatal("fstat %s: %m", path); if (vstream_ferror(fp) || vstream_fclose(fp)) msg_fatal("read %s: %m", path); after = time((time_t *) 0); if (st.st_mtime < before - 1 || st.st_mtime > after) break; if (msg_verbose) msg_info("pausing to let %s cool down", path); doze(300000); }}
开发者ID:ystk,项目名称:debian-postfix,代码行数:28,
示例6: edit_file_closeint edit_file_close(EDIT_FILE *ep){ VSTREAM *fp = ep->tmp_fp; int fd = vstream_fileno(fp); int saved_errno; /* * The rename/unlock portion of the protocol is relatively simple. The * only things that really matter here are that we change permissions as * late as possible, and that we rename the file to its final pathname * before we lose the exclusive lock. * * Applications that are concerned about maximal safety should protect the * edit_file_close() call with sigdelay() and sigresume() calls. It is * not safe for us to call these functions directly, because the calls do * not nest. It is also not nice to force every caller to run with * interrupts turned off. */ if (vstream_fflush(fp) < 0 || fchmod(fd, ep->final_mode) < 0#ifdef HAS_FSYNC || fsync(fd) < 0#endif || rename(ep->tmp_path, ep->final_path) < 0) { saved_errno = errno; edit_file_cleanup(ep); errno = saved_errno; return (VSTREAM_EOF); } else { (void) vstream_fclose(ep->tmp_fp); EDIT_FILE_FREE(ep); return (0); }}
开发者ID:ystk,项目名称:debian-postfix,代码行数:34,
示例7: smtpd_proxy_freevoid smtpd_proxy_free(SMTPD_STATE *state){ SMTPD_PROXY *proxy = state->proxy; /* * Clean up. */ if (proxy->service_stream != 0) (void) smtpd_proxy_close(state); if (proxy->request != 0) vstring_free(proxy->request); if (proxy->reply != 0) vstring_free(proxy->reply); myfree((char *) proxy); state->proxy = 0; /* * Reuse the replay logfile if possible. For security reasons we must * truncate the replay logfile before reuse. For performance reasons we * should truncate the replay logfile immediately after the end of a mail * transaction. We truncate the file here, and enforce the security * guarantee by requiring that no I/O happens before the file is reused. */ if (smtpd_proxy_replay_stream == 0) return; if (vstream_ferror(smtpd_proxy_replay_stream)) { /* Errors are already reported. */ (void) vstream_fclose(smtpd_proxy_replay_stream); smtpd_proxy_replay_stream = 0; return; } /* Flush output from aborted transaction before truncating the file!! */ if (vstream_fseek(smtpd_proxy_replay_stream, (off_t) 0, SEEK_SET) < 0) { msg_warn("seek before-queue filter speed-adjust log: %m"); (void) vstream_fclose(smtpd_proxy_replay_stream); smtpd_proxy_replay_stream = 0; return; } if (ftruncate(vstream_fileno(smtpd_proxy_replay_stream), (off_t) 0) < 0) { msg_warn("truncate before-queue filter speed-adjust log: %m"); (void) vstream_fclose(smtpd_proxy_replay_stream); smtpd_proxy_replay_stream = 0; return; }}
开发者ID:ajinkya93,项目名称:netbsd-src,代码行数:45,
示例8: pcf_read_mastervoid pcf_read_master(int fail_on_open_error){ const char *myname = "pcf_read_master"; char *path; VSTRING *buf; VSTREAM *fp; const char *err; int entry_count = 0; int line_count; int last_line = 0; /* * Sanity check. */ if (pcf_master_table != 0) msg_panic("%s: master table is already initialized", myname); /* * Get the location of master.cf. */ if (var_config_dir == 0) pcf_set_config_dir(); path = concatenate(var_config_dir, "/", MASTER_CONF_FILE, (char *) 0); /* * Initialize the in-memory master table. */ pcf_master_table = (PCF_MASTER_ENT *) mymalloc(sizeof(*pcf_master_table)); /* * Skip blank lines and comment lines. Degrade gracefully if master.cf is * not available, and master.cf is not the primary target. */ if ((fp = vstream_fopen(path, O_RDONLY, 0)) == 0) { if (fail_on_open_error) msg_fatal("open %s: %m", path); msg_warn("open %s: %m", path); } else { buf = vstring_alloc(100); while (readllines(buf, fp, &last_line, &line_count) != 0) { pcf_master_table = (PCF_MASTER_ENT *) myrealloc((void *) pcf_master_table, (entry_count + 2) * sizeof(*pcf_master_table)); if ((err = pcf_parse_master_entry(pcf_master_table + entry_count, STR(buf))) != 0) msg_fatal("file %s: line %d: %s", path, line_count, err); entry_count += 1; } vstream_fclose(fp); vstring_free(buf); } /* * Null-terminate the master table and clean up. */ pcf_master_table[entry_count].argv = 0; myfree(path);}
开发者ID:DabeDotCom,项目名称:postfix,代码行数:57,
示例9: quit_donestatic void quit_done(int unused_event, char *context){ SESSION *session = (SESSION *) context; (void) response(session->stream, buffer); event_disable_readwrite(vstream_fileno(session->stream)); vstream_fclose(session->stream); session->stream = 0; start_another(session);}
开发者ID:KKcorps,项目名称:postfix,代码行数:10,
示例10: vstring_allocDICT *dict_cidr_open(const char *mapname, int open_flags, int dict_flags){ DICT_CIDR *dict_cidr; VSTREAM *map_fp; VSTRING *line_buffer = vstring_alloc(100); VSTRING *why = vstring_alloc(100); DICT_CIDR_ENTRY *rule; DICT_CIDR_ENTRY *last_rule = 0; int lineno = 0; /* * Sanity checks. */ if (open_flags != O_RDONLY) msg_fatal("%s:%s map requires O_RDONLY access mode", DICT_TYPE_CIDR, mapname); /* * XXX Eliminate unnecessary queries by setting a flag that says "this * map matches network addresses only". */ dict_cidr = (DICT_CIDR *) dict_alloc(DICT_TYPE_CIDR, mapname, sizeof(*dict_cidr)); dict_cidr->dict.lookup = dict_cidr_lookup; dict_cidr->dict.close = dict_cidr_close; dict_cidr->dict.flags = dict_flags | DICT_FLAG_PATTERN; dict_cidr->head = 0; if ((map_fp = vstream_fopen(mapname, O_RDONLY, 0)) == 0) msg_fatal("open %s: %m", mapname); while (readlline(line_buffer, map_fp, &lineno)) { rule = dict_cidr_parse_rule(vstring_str(line_buffer), why); if (rule == 0) { msg_warn("cidr map %s, line %d: %s: skipping this rule", mapname, lineno, vstring_str(why)); continue; } if (last_rule == 0) dict_cidr->head = rule; else last_rule->cidr_info.next = &(rule->cidr_info); last_rule = rule; } /* * Clean up. */ if (vstream_fclose(map_fp)) msg_fatal("cidr map %s: read error: %m", mapname); vstring_free(line_buffer); vstring_free(why); return (DICT_DEBUG (&dict_cidr->dict));}
开发者ID:VargMon,项目名称:netbsd-cvs-mirror,代码行数:55,
示例11: edit_file_cleanupvoid edit_file_cleanup(EDIT_FILE *ep){ /* * Don't touch the file after we lose the exclusive lock! */ if (unlink(ep->tmp_path) < 0 && errno != ENOENT) msg_fatal("unlink %s: %m", ep->tmp_path); (void) vstream_fclose(ep->tmp_fp); EDIT_FILE_FREE(ep);}
开发者ID:ystk,项目名称:debian-postfix,代码行数:11,
示例12: xsasl_dovecot_server_disconnectstatic void xsasl_dovecot_server_disconnect(XSASL_DOVECOT_SERVER_IMPL *xp){ if (xp->sasl_stream) { (void) vstream_fclose(xp->sasl_stream); xp->sasl_stream = 0; } if (xp->mechanism_list) { xsasl_dovecot_server_mech_free(xp->mechanism_list); xp->mechanism_list = 0; }}
开发者ID:Jingeun,项目名称:tongsu_smtp,代码行数:11,
示例13: dict_tcp_closestatic void dict_tcp_close(DICT *dict){ DICT_TCP *dict_tcp = (DICT_TCP *) dict; if (dict_tcp->fp) (void) vstream_fclose(dict_tcp->fp); if (dict_tcp->raw_buf) vstring_free(dict_tcp->raw_buf); if (dict_tcp->hex_buf) vstring_free(dict_tcp->hex_buf); dict_free(dict);}
开发者ID:TonyChengTW,项目名称:Rmail,代码行数:12,
示例14: mainmain(void){ VSTRING *vp = vstring_alloc(1); VSTREAM *fp; if ((fp = vstream_fopen(TEXT_VSTREAM, O_RDONLY, 0)) == 0) msg_fatal("open %s: %m", TEXT_VSTREAM); while (vstring_fgets(vp, fp)) vstream_fprintf(VSTREAM_OUT, "%s", vstring_str(vp)); vstream_fclose(fp); vstream_fflush(VSTREAM_OUT); vstring_free(vp);}
开发者ID:TonyChengTW,项目名称:Rmail,代码行数:13,
示例15: event_server_disconnectvoid event_server_disconnect(VSTREAM *stream){ if (msg_verbose) msg_info("connection closed fd %d", vstream_fileno(stream)); if (event_server_pre_disconn) event_server_pre_disconn(stream, event_server_name, event_server_argv); (void) vstream_fclose(stream); client_count--; /* Avoid integer wrap-around in a persistent process. */ if (use_count < INT_MAX) use_count++; if (client_count == 0 && var_idle_limit > 0) event_request_timer(event_server_timeout, (char *) 0, var_idle_limit);}
开发者ID:Gelma,项目名称:Postfix,代码行数:14,
示例16: end_master_entvoid end_master_ent(){ const char *myname = "end_master_ent"; if (master_fp == 0) msg_panic("%s: configuration file not open", myname); if (vstream_fclose(master_fp) != 0) msg_fatal("%s: close configuration file: %m", myname); master_fp = 0; if (master_disable == 0) msg_panic("%s: no service disable list", myname); match_service_free(master_disable); master_disable = 0;}
开发者ID:tmtm,项目名称:postfix,代码行数:14,
示例17: fail_connectstatic void fail_connect(SESSION *session){ if (session->connect_count-- == 1) msg_fatal("connect: %m"); msg_warn("connect: %m"); event_disable_readwrite(vstream_fileno(session->stream)); vstream_fclose(session->stream); session->stream = 0;#ifdef MISSING_USLEEP doze(10);#else usleep(10);#endif start_connect(session);}
开发者ID:KKcorps,项目名称:postfix,代码行数:15,
示例18: flush_add_pathstatic int flush_add_path(const char *path, const char *queue_id){ const char *myname = "flush_add_path"; VSTREAM *log; /* * Sanity check. */ if (!mail_queue_id_ok(path)) return (FLUSH_STAT_BAD); /* * Open the logfile or bust. */ if ((log = mail_queue_open(MAIL_QUEUE_FLUSH, path, O_CREAT | O_APPEND | O_WRONLY, 0600)) == 0) msg_fatal("%s: open fast flush logfile %s: %m", myname, path); /* * We must lock the logfile, so that we don't lose information due to * concurrent access. If the lock takes too long, the Postfix watchdog * will eventually take care of the problem, but it will take a while. */ if (myflock(vstream_fileno(log), INTERNAL_LOCK, MYFLOCK_OP_EXCLUSIVE) < 0) msg_fatal("%s: lock fast flush logfile %s: %m", myname, path); /* * Append the queue ID. With 15 bits of microsecond time, a queue ID is * not recycled often enough for false hits to be a problem. If it does, * then we could add other signature information, such as the file size * in bytes. */ vstream_fprintf(log, "%s/n", queue_id); if (vstream_fflush(log)) msg_warn("write fast flush logfile %s: %m", path); /* * Clean up. */ if (myflock(vstream_fileno(log), INTERNAL_LOCK, MYFLOCK_OP_NONE) < 0) msg_fatal("%s: unlock fast flush logfile %s: %m", myname, path); if (vstream_fclose(log) != 0) msg_warn("write fast flush logfile %s: %m", path); return (FLUSH_STAT_OK);}
开发者ID:Jingeun,项目名称:tongsu_smtp,代码行数:46,
示例19: vstring_sprintfstatic VSTREAM *safe_open_create(const char *path, int flags, int mode, struct stat * st, uid_t user, uid_t group, VSTRING *why){ VSTREAM *fp; /* * Create a non-existing file. This relies on O_CREAT | O_EXCL to not * follow symbolic links. */ if ((fp = vstream_fopen(path, flags | (O_CREAT | O_EXCL), mode)) == 0) { vstring_sprintf(why, "cannot create file exclusively: %m"); return (0); } /* * Optionally change ownership after creating a new file. If there is a * problem we should not attempt to delete the file. Something else may * have opened the file in the mean time. */#define CHANGE_OWNER(user, group) (user != (uid_t) -1 || group != (gid_t) -1) if (CHANGE_OWNER(user, group) && fchown(vstream_fileno(fp), user, group) < 0) { msg_warn("%s: cannot change file ownership: %m", path); } /* * Optionally look up the file attributes. */ if (st != 0 && fstat(vstream_fileno(fp), st) < 0) msg_fatal("%s: bad open file status: %m", path); /* * We are almost there... */ else { return (fp); } /* * End up here in case of trouble. */ vstream_fclose(fp); return (0);}
开发者ID:TonyChengTW,项目名称:Rmail,代码行数:45,
示例20: forward_finishint forward_finish(DELIVER_REQUEST *request, DELIVER_ATTR attr, int cancel){ HTABLE_INFO **dt_list; HTABLE_INFO **dt; HTABLE_INFO **sn_list; HTABLE_INFO **sn; HTABLE *table_snd; char *delivered; char *sender; FORWARD_INFO *info; int status = cancel; /* * Sanity checks. */ if (forward_dt == 0) msg_panic("forward_finish: missing forward_init call"); /* * Walk over all delivered-to header addresses and over each envelope * sender address. */ for (dt = dt_list = htable_list(forward_dt); *dt; dt++) { delivered = dt[0]->key; table_snd = (HTABLE *) dt[0]->value; for (sn = sn_list = htable_list(table_snd); *sn; sn++) { sender = sn[0]->key; info = (FORWARD_INFO *) sn[0]->value; if (status == 0) status |= forward_send(info, request, attr, delivered); if (msg_verbose) msg_info("forward_finish: delivered %s sender %s status %d", delivered, sender, status); (void) vstream_fclose(info->cleanup); myfree(info->queue_id); myfree((void *) info); } myfree((void *) sn_list); htable_free(table_snd, (void (*) (void *)) 0); } myfree((void *) dt_list); htable_free(forward_dt, (void (*) (void *)) 0); forward_dt = 0; return (status);}
开发者ID:DabeDotCom,项目名称:postfix,代码行数:45,
示例21: returnVSTREAM *open_lock(const char *path, int flags, int mode, VSTRING *why){ VSTREAM *fp; /* * Carefully create or open the file, and lock it down. Some systems * don't have the O_LOCK open() flag, or the flag does not do what we * want, so we roll our own lock. */ if ((fp = safe_open(path, flags, mode, (struct stat *) 0, -1, -1, why)) == 0) return (0); if (myflock(vstream_fileno(fp), INTERNAL_LOCK, MYFLOCK_OP_EXCLUSIVE | MYFLOCK_OP_NOWAIT) < 0) { vstring_sprintf(why, "unable to set exclusive lock: %m"); vstream_fclose(fp); return (0); } return (fp);}
开发者ID:TonyChengTW,项目名称:Rmail,代码行数:19,
示例22: smtpd_proxy_closevoid smtpd_proxy_close(SMTPD_STATE *state){ SMTPD_PROXY *proxy = state->proxy; /* * Specify SMTPD_PROX_WANT_NONE so that the server reply will not clobber * the END-OF-DATA reply. */ if (proxy->service_stream != 0) { if (vstream_feof(proxy->service_stream) == 0 && vstream_ferror(proxy->service_stream) == 0) (void) smtpd_proxy_cmd(state, SMTPD_PROX_WANT_NONE, SMTPD_CMD_QUIT); (void) vstream_fclose(proxy->service_stream); if (proxy->stream == proxy->service_stream) proxy->stream = 0; proxy->service_stream = 0; }}
开发者ID:ajinkya93,项目名称:netbsd-src,代码行数:19,
示例23: single_server_wakeupstatic void single_server_wakeup(int fd, HTABLE *attr){ VSTREAM *stream; char *tmp; /* * If the accept() succeeds, be sure to disable non-blocking I/O, because * the application is supposed to be single-threaded. Notice the master * of our (un)availability to service connection requests. Commit suicide * when the master process disconnected from us. Don't drop the already * accepted client request after "postfix reload"; that would be rude. */ if (msg_verbose) msg_info("connection established"); non_blocking(fd, BLOCKING); close_on_exec(fd, CLOSE_ON_EXEC); stream = vstream_fdopen(fd, O_RDWR); tmp = concatenate(single_server_name, " socket", (char *) 0); vstream_control(stream, CA_VSTREAM_CTL_PATH(tmp), CA_VSTREAM_CTL_CONTEXT((void *) attr), CA_VSTREAM_CTL_END); myfree(tmp); timed_ipc_setup(stream); if (master_notify(var_pid, single_server_generation, MASTER_STAT_TAKEN) < 0) /* void */ ; if (single_server_in_flow_delay && mail_flow_get(1) < 0) doze(var_in_flow_delay * 1000000); single_server_service(stream, single_server_name, single_server_argv); (void) vstream_fclose(stream); if (master_notify(var_pid, single_server_generation, MASTER_STAT_AVAIL) < 0) single_server_abort(EVENT_NULL_TYPE, EVENT_NULL_CONTEXT); if (msg_verbose) msg_info("connection closed"); /* Avoid integer wrap-around in a persistent process. */ if (use_count < INT_MAX) use_count++; if (var_idle_limit > 0) event_request_timer(single_server_timeout, (void *) 0, var_idle_limit); if (attr) htable_free(attr, myfree);}
开发者ID:ureyni,项目名称:postfix.3.1,代码行数:42,
示例24: clnt_stream_closestatic void clnt_stream_close(CLNT_STREAM *clnt_stream){ /* * Sanity check. */ if (clnt_stream->vstream == 0) msg_panic("clnt_stream_close: stream is closed"); /* * Be sure to disable read and timer events. */ if (msg_verbose) msg_info("%s stream disconnect", clnt_stream->service); event_disable_readwrite(vstream_fileno(clnt_stream->vstream)); event_cancel_timer(clnt_stream_event, (void *) clnt_stream); event_cancel_timer(clnt_stream_ttl_event, (void *) clnt_stream); (void) vstream_fclose(clnt_stream->vstream); clnt_stream->vstream = 0;}
开发者ID:ii0,项目名称:postfix,代码行数:20,
示例25: deliver_request_freestatic void deliver_request_free(DELIVER_REQUEST *request){ if (request->fp) vstream_fclose(request->fp); if (request->queue_name) myfree(request->queue_name); if (request->queue_id) myfree(request->queue_id); if (request->nexthop) myfree(request->nexthop); if (request->encoding) myfree(request->encoding); if (request->sender) myfree(request->sender); recipient_list_free(&request->rcpt_list); if (request->hop_status) dsn_free(request->hop_status); if (request->client_name) myfree(request->client_name); if (request->client_addr) myfree(request->client_addr); if (request->client_port) myfree(request->client_port); if (request->client_proto) myfree(request->client_proto); if (request->client_helo) myfree(request->client_helo); if (request->sasl_method) myfree(request->sasl_method); if (request->sasl_username) myfree(request->sasl_username); if (request->sasl_sender) myfree(request->sasl_sender); if (request->rewrite_context) myfree(request->rewrite_context); if (request->dsn_envid) myfree(request->dsn_envid); myfree((char *) request);}
开发者ID:ystk,项目名称:debian-postfix,代码行数:39,
注:本文中的vstream_fclose函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ vstream_fflush函数代码示例 C++ vst_strncpy函数代码示例 |