File:  [Research Unix] / researchv10no / ipc / mgrs / svcmgr / request.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:21:34 2018 UTC (8 years, 1 month ago) by root
Branches: belllabs, MAIN
CVS tags: researchv10, HEAD
researchv10 Norman

#include "mgr.h"

/*
 *  create a new request.  the request is staticly allocated since
 *  only one exists per process.
 */
Request *
newrequest(ip, sp)
	ipcinfo *ip;
	Service *sp;
{
	static Request r;

	r.i = ip;
	r.s = sp;
	r.line = r.args = r.term = NULL;
	r.errfd = -1;
	return &r;
}

freerequest(rp)
	Request *rp;
{
	if(rp->line)
		free(rp->line);
	if(rp->args)
		free(rp->args);
}

/*
 *  execute a request
 */
doreq(rp)
	Request *rp;
{
	Action *ap;

	for(ap=rp->s->ap; ap; ap=ap->next) {
		if((*ap->func)(rp, ap)<0){
			logstatus("in", rp->i);
			return;
		}
	}
}

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.