Added display of current active TEI values (L2) at lcradmin.
[lcr.git] / options.c
index 6bfdb97..160a8a8 100644 (file)
--- a/options.c
+++ b/options.c
@@ -26,11 +26,12 @@ struct options options = {
        "00",                           /* international prefix */
        "tones_american",               /* directory of tones */
        "",                             /* directories of tones to fetch */
-       "extensions",                   /* directory of extensions */
        "",                             /* dummy caller id */
        0,                              /* use tones by dsp.o */
        0,                              /* by default use priority 0 */
-       "lcr@your.machine"              /* source mail adress */
+       "lcr@your.machine",             /* source mail adress */
+       "/var/tmp",                     /* path of lock files */
+       0700                            /* rights of lcr admin socket */
 };
 
 char options_error[256];
@@ -49,7 +50,7 @@ int read_options(void)
        unsigned int line,i;
        char buffer[256];
 
-       SPRINT(filename, "%s/options.conf", INSTALL_DATA);
+       SPRINT(filename, "%s/options.conf", CONFIG_DATA);
 
        if (!(fp=fopen(filename,"r")))
        {
@@ -174,15 +175,7 @@ int read_options(void)
                } else
                if (!strcmp(option,"extensions_dir"))
                {
-                       if (param[0]==0)
-                       {
-                               SPRINT(options_error, "Error in %s (line %d): parameter for option %s missing.\n",filename,line,option);
-                               goto error;
-                       }
-                       if (param[strlen(param)-1] == '/')
-                               param[strlen(param)-1]=0;
-                       SCPY(options.extensions_dir, param);
-
+                       // obsolete
                } else
                if (!strcmp(option,"national"))
                {
@@ -240,6 +233,22 @@ int read_options(void)
                        SCPY(options.email, param);
 
                } else
+               if (!strcmp(option,"lock"))
+               {
+                       if (param[0]==0)
+                       {
+                               SPRINT(options_error, "Error in %s (line %d): parameter for option %s missing.\n",filename,line,option);
+                               goto error;
+                       }
+                       if (param[strlen(param)-1] == '/')
+                               param[strlen(param)-1]=0;
+                       SCPY(options.lock, param);
+
+               } else
+               if (!strcmp(option,"socketrights"))
+               {
+                       options.socketrights = strtol(param, NULL, 0);
+               } else
                {
                        SPRINT(options_error, "Error in %s (line %d): wrong option keyword %s.\n", filename,line,option);
                        goto error;