modrec.o \
lvleml.o \
gestcp.o \
- devsoc.o \
- unieml.o \
+ devlog.o devsoc.o \
+ unieml.o \
unipar.o uniprc.o unisig.o unitls.o \
subrou.o
unisig.h \
gestcp.h gestcp.c
+devlog.o: \
+ subrou.h \
+ uniprc.h \
+ devlog.h devlog.c
+
devsoc.o: \
subrou.h \
unieml.h \
--- /dev/null
+// vim: smarttab tabstop=8 shiftwidth=2 expandtab
+/********************************************************/
+/* */
+/* Log management implementation module */
+/* */
+/********************************************************/
+#include <stdbool.h>
+#include <stdio.h>
+
+#include "subrou.h"
+#include "uniprc.h"
+#include "devlog.h"
+
+static _Bool modopen; //boolean module open/close
+/*
+^L
+*/
+/********************************************************/
+/* */
+/* Procedure to "open/close" module and do */
+/* homework purpose */
+/* return zero if everything right */
+/* */
+/********************************************************/
+PUBLIC int log_modedevlog(_Bool mode)
+
+{
+#define OPEP "devlog.c:log_modedevlog"
+
+int status;
+
+status=0;
+if (mode!=modopen) {
+ switch ((int)mode) {
+ case true :
+ break;
+ case false :
+ break;
+ default :
+ (void) fprintf(stderr,"Calling %s with wrong mode='%d' (Bug?!):",
+ OPEP,(int)mode);
+ status=-1;
+ break;
+ }
+ modopen=mode;
+ }
+return status;
+#undef OPEP
+}
--- /dev/null
+// vim: smarttab tabstop=8 shiftwidth=2 expandtab
+/************************************************/
+/* */
+/* device level, logs management */
+/* declaration. */
+/* */
+/************************************************/
+#ifndef DEVLOG
+#define DEVLOG
+
+//homework to be done before starting/stopping module.
+extern int log_modedevlog(_Bool mode);
+
+#endif
/* Procedure to rset the current session */
/* */
/************************************************/
-static _Bool dorset(CONTYP *contact,char *keyword,char *parameter)
+static _Bool doreset(CONTYP *contact,char *keyword,char *parameter)
{
(void) transmit(contact,"%d 2.0.0 Flushed session %s",CMDOK,contact->cursesid);
proceed=false;
break;
case c_rset : //Doing session reset
- proceed=dorset(contact,line,parameter);
+ proceed=doreset(contact,line,parameter);
break;
case c_starttls : //EHLO start encryptel link
switch (soc_starttls(contact->socptr,contact->peerip)) {
//version definition
#define VERSION "0.4.1"
-#define RELEASE "3"
+#define RELEASE "4"
//Public variables
PUBLIC int debug=0; //debug level
// vim: smarttab tabstop=8 shiftwidth=2 expandtab
/********************************************************/
/* */
-/* Module for low level subroutine */
+/* Process management implementation module. */
/* */
/********************************************************/
#include <sys/prctl.h>
PUBLIC int prc_modeuniprc(_Bool mode)
{
-#define OPEP "unipar.c:prc_modeuniprc"
+#define OPEP "uniprc.c:prc_modeuniprc"
int status;