rem: FILE *file_handle;
context: static void fifo_server(FILE *fifo_stream){	char buf[MAX_FIFO_COMMAND];	int line_len;	char *file_sep, *command, *file;	struct fifo_command *f;	FILE *file_handle;	file_sep=command=file=0;	while(1) {		/* commands must look this way ':<command>:[filename]' */		if (!read_line(buf, MAX_FIFO_COMMAND, fifo_stream, &line_len)) {			/* line breaking must have failed -- consume the rest			   and proceed to a new request			*/			LOG(L_ERR, "ERROR: fifo_server: command expected\n");			goto consume;		}		if (line_len==0) {			LOG(L_INFO, "INFO: fifo_server: command empty\n");			continue;		}		if (line_len<3) {			LOG(L_ERR, "ERROR: fifo_server: command must have at least 3 chars\n");			goto consume;		}		if (*buf!=CMD_SEPARATOR) {			LOG(L_ERR, "ERROR: fifo_server: command must begin with %c: %.*s\n", 				CMD_SEPARATOR, line_len, buf );			goto consume;		}		command=buf+1;		file_sep=strchr(command, CMD_SEPARATOR );		if (file_sep==NULL) {			LOG(L_ERR, "ERROR: fifo_server: file separator missing\n");			goto consume;		}		if (file_sep==command) {			LOG(L_ERR, "ERROR: fifo_server: empty command\n");			goto consume;		}		if (*(file_sep+1)==0) file=NULL; 		else {			file=file_sep+1;			file=trim_filename(file);			if (file==0) {				LOG(L_ERR, "ERROR: fifo_server: trimming filename\n");				goto consume;			}		}		/* make command zero-terminated */		*file_sep=0;		f=lookup_fifo_cmd( command );		if (f==0) {			LOG(L_ERR, "ERROR: fifo_server: command %s is not available\n",				command);			file_handle=open_reply_pipe(file);			if (file_handle==0) {				LOG(L_ERR, "ERROR: fifo_server: no reply pipe\n");				goto consume;			}			if (fprintf(file_handle, "[%s not available]\n", command)<=0) {				LOG(L_ERR, "ERROR: fifo_server: write error: %s\n",				 	strerror(errno));			}			fclose(file_handle);			goto consume;		}		if (f->f(fifo_stream, file)<0) {			LOG(L_ERR, "ERROR: fifo_server: command (%s) "				"processing failed\n", command );#ifdef _OBSOLETED			file_handle=open_reply_pipe(file);			if (file_handle==0) {				LOG(L_ERR, "ERROR: fifo_server: no reply pipe\n");				goto consume;			}			if (fprintf(file_handle, "[%s failed]\n", command)<=0) {				LOG(L_ERR, "ERROR: fifo_server: write error: %s\n",				strerror(errno));			}			fclose(file_handle);#endif			goto consume;		}consume:		if (file) { pkg_free(file); file=0;}		consume_request(fifo_stream);	}}