Browse code

- removed implementation of fifo and unixsocket servers from core (it will be implemented in modules instead)

Jan Janak authored on 21/12/2005 17:27:21
Showing 1 changed files
1 1
deleted file mode 100644
... ...
@@ -1,92 +0,0 @@
1
-/*
2
- * $Id$
3
- *
4
- *
5
- * Copyright (C) 2001-2003 FhG Fokus
6
- *
7
- * This file is part of ser, a free SIP server.
8
- *
9
- * ser is free software; you can redistribute it and/or modify
10
- * it under the terms of the GNU General Public License as published by
11
- * the Free Software Foundation; either version 2 of the License, or
12
- * (at your option) any later version
13
- *
14
- * For a license to use the ser software under conditions
15
- * other than those described here, or to purchase support for this
16
- * software, please contact iptel.org by e-mail at the following addresses:
17
- *    info@iptel.org
18
- *
19
- * ser is distributed in the hope that it will be useful,
20
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
21
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22
- * GNU General Public License for more details.
23
- *
24
- * You should have received a copy of the GNU General Public License 
25
- * along with this program; if not, write to the Free Software 
26
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
27
- */
28
-
29
-
30
-#ifndef _FIFO_SERVER_H
31
-#define _FIFO_SERVER_H
32
-
33
-#include <stdio.h>
34
-
35
-#define CMD_SEPARATOR ':'
36
-
37
-/* core FIFO command set */
38
-/* echo input */
39
-#define FIFO_PRINT "print"
40
-/* print server's uptime */
41
-#define FIFO_UPTIME "uptime"
42
-/* print server's version */
43
-#define FIFO_VERSION "version"
44
-/* print available FIFO commands */
45
-#define FIFO_WHICH "which"
46
-/* print server's process table */
47
-#define FIFO_PS "ps"
48
-/* print server's command line arguments */
49
-#define FIFO_ARG "arg"
50
-/* print server's working directory */
51
-#define FIFO_PWD "pwd"
52
-/* kill the server */
53
-#define FIFO_KILL "kill"
54
-#define FIFO_MEMINFO "meminfo"
55
-
56
-#define MAX_CTIME_LEN 128
57
-
58
-typedef int (fifo_cmd)( FILE *fifo_stream, char *response_file );
59
-
60
-struct fifo_command{
61
-	fifo_cmd *f;
62
-	struct fifo_command *next;
63
-	void *param;
64
-	char *name;
65
-};
66
-
67
-int register_fifo_cmd(fifo_cmd f, char *cmd_name, void *param);
68
-
69
-/* read a single EoL-terminated line from fifo */
70
-int read_line( char *b, int max, FILE *stream, int *read );
71
-/* consume EoL from fifo */
72
-int read_eol( FILE *stream );
73
-/* consume a set of EoL-terminated lines terminated by an additional EoL */
74
-int read_line_set(char *buf, int max_len, FILE *fifo, int *len);
75
-/* consume a set of EoL-terminated lines terminated by a single dot line */
76
-int read_body(char *buf, int max_len, FILE *fifo, int *len);
77
-
78
-int init_fifo_server();
79
-int start_fifo_server();
80
-
81
-/* register core FIFO command set */
82
-int register_core_fifo();
83
-
84
-FILE *open_reply_pipe( char *pipe_name );
85
-
86
-/* tell FIFO client an error occurred via reply pipe */
87
-void fifo_reply( char *reply_fifo, char *reply_fmt, ... );
88
-
89
-/* memory deallocation */
90
-void destroy_fifo();
91
-
92
-#endif
Browse code

- re-enabled locking in shm_status() - added fifo meminfo commands: serctl fifo meminfo total:33340380 free:33112744 used:227636 max used:227636 fragments:1

(where used = allocated shm mem + overhead)

Andrei Pelinescu-Onciul authored on 02/03/2005 11:45:12
Showing 1 changed files
... ...
@@ -51,6 +51,7 @@
51 51
 #define FIFO_PWD "pwd"
52 52
 /* kill the server */
53 53
 #define FIFO_KILL "kill"
54
+#define FIFO_MEMINFO "meminfo"
54 55
 
55 56
 #define MAX_CTIME_LEN 128
56 57
 
Browse code

- Spelling checked - READMEs updated

Jan Janak authored on 24/08/2004 08:45:09
Showing 1 changed files
... ...
@@ -2,7 +2,7 @@
2 2
  * $Id$
3 3
  *
4 4
  *
5
- * Copyright (C) 2001-2003 Fhg Fokus
5
+ * Copyright (C) 2001-2003 FhG Fokus
6 6
  *
7 7
  * This file is part of ser, a free SIP server.
8 8
  *
... ...
@@ -77,12 +77,12 @@ int read_body(char *buf, int max_len, FILE *fifo, int *len);
77 77
 int init_fifo_server();
78 78
 int start_fifo_server();
79 79
 
80
-/* regsiter core FIFO command set */
80
+/* register core FIFO command set */
81 81
 int register_core_fifo();
82 82
 
83 83
 FILE *open_reply_pipe( char *pipe_name );
84 84
 
85
-/* tell FIFO client an error occured via reply pipe */
85
+/* tell FIFO client an error occurred via reply pipe */
86 86
 void fifo_reply( char *reply_fifo, char *reply_fmt, ... );
87 87
 
88 88
 /* memory deallocation */
Browse code

- open_fifo_server split into init_fifo_server and start_fifo_server - init_fifo_server called before do_suid - start_fifo_server called after do_suid and after all sockets are opened (to inherit them) - fixed init order fro non_fork_mode (this mode is only for debugging, shouldn't need fifo or unix server, but if it needs them try to init them before do_suid and start them after) - increased version no.

Andrei Pelinescu-Onciul authored on 09/03/2004 15:18:10
Showing 1 changed files
... ...
@@ -74,7 +74,8 @@ int read_line_set(char *buf, int max_len, FILE *fifo, int *len);
74 74
 /* consume a set of EoL-terminated lines terminated by a single dot line */
75 75
 int read_body(char *buf, int max_len, FILE *fifo, int *len);
76 76
 
77
-int open_fifo_server();
77
+int init_fifo_server();
78
+int start_fifo_server();
78 79
 
79 80
 /* regsiter core FIFO command set */
80 81
 int register_core_fifo();
Browse code

fifo, script callbacks and timer release pkg mem from cleanup; note that it affects only the main process

Jiri Kuthan authored on 29/03/2003 02:30:35
Showing 1 changed files
... ...
@@ -84,5 +84,7 @@ FILE *open_reply_pipe( char *pipe_name );
84 84
 /* tell FIFO client an error occured via reply pipe */
85 85
 void fifo_reply( char *reply_fifo, char *reply_fmt, ... );
86 86
 
87
+/* memory deallocation */
88
+void destroy_fifo();
87 89
 
88 90
 #endif
Browse code

kill fifo command introduced

Jiri Kuthan authored on 27/02/2003 20:20:13
Showing 1 changed files
... ...
@@ -49,6 +49,8 @@
49 49
 #define FIFO_ARG "arg"
50 50
 /* print server's working directory */
51 51
 #define FIFO_PWD "pwd"
52
+/* kill the server */
53
+#define FIFO_KILL "kill"
52 54
 
53 55
 #define MAX_CTIME_LEN 128
54 56
 
Browse code

scratchpad removed, textops changed to skip the first line

Jiri Kuthan authored on 29/01/2003 19:24:10
Showing 1 changed files
... ...
@@ -45,6 +45,10 @@
45 45
 #define FIFO_WHICH "which"
46 46
 /* print server's process table */
47 47
 #define FIFO_PS "ps"
48
+/* print server's command line arguments */
49
+#define FIFO_ARG "arg"
50
+/* print server's working directory */
51
+#define FIFO_PWD "pwd"
48 52
 
49 53
 #define MAX_CTIME_LEN 128
50 54
 
Browse code

GPLization banner introduced to *.[hc] files

Jiri Kuthan authored on 19/09/2002 12:23:52
Showing 1 changed files
... ...
@@ -1,8 +1,32 @@
1 1
 /*
2 2
  * $Id$
3 3
  *
4
+ *
5
+ * Copyright (C) 2001-2003 Fhg Fokus
6
+ *
7
+ * This file is part of ser, a free SIP server.
8
+ *
9
+ * ser is free software; you can redistribute it and/or modify
10
+ * it under the terms of the GNU General Public License as published by
11
+ * the Free Software Foundation; either version 2 of the License, or
12
+ * (at your option) any later version
13
+ *
14
+ * For a license to use the ser software under conditions
15
+ * other than those described here, or to purchase support for this
16
+ * software, please contact iptel.org by e-mail at the following addresses:
17
+ *    info@iptel.org
18
+ *
19
+ * ser is distributed in the hope that it will be useful,
20
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
21
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22
+ * GNU General Public License for more details.
23
+ *
24
+ * You should have received a copy of the GNU General Public License 
25
+ * along with this program; if not, write to the Free Software 
26
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
4 27
  */
5 28
 
29
+
6 30
 #ifndef _FIFO_SERVER_H
7 31
 #define _FIFO_SERVER_H
8 32
 
Browse code

process table introduced; rest of code aligned with proces_no bug_fix

Jiri Kuthan authored on 18/09/2002 07:49:31
Showing 1 changed files
... ...
@@ -11,10 +11,16 @@
11 11
 #define CMD_SEPARATOR ':'
12 12
 
13 13
 /* core FIFO command set */
14
+/* echo input */
14 15
 #define FIFO_PRINT "print"
16
+/* print server's uptime */
15 17
 #define FIFO_UPTIME "uptime"
18
+/* print server's version */
16 19
 #define FIFO_VERSION "version"
20
+/* print available FIFO commands */
17 21
 #define FIFO_WHICH "which"
22
+/* print server's process table */
23
+#define FIFO_PS "ps"
18 24
 
19 25
 #define MAX_CTIME_LEN 128
20 26
 
Browse code

new 'which' FIFO command introduced

Jiri Kuthan authored on 08/09/2002 15:41:06
Showing 1 changed files
... ...
@@ -14,6 +14,7 @@
14 14
 #define FIFO_PRINT "print"
15 15
 #define FIFO_UPTIME "uptime"
16 16
 #define FIFO_VERSION "version"
17
+#define FIFO_WHICH "which"
17 18
 
18 19
 #define MAX_CTIME_LEN 128
19 20
 
Browse code

"now time" "pre-printed" now

Jiri Kuthan authored on 04/09/2002 22:37:30
Showing 1 changed files
... ...
@@ -15,6 +15,8 @@
15 15
 #define FIFO_UPTIME "uptime"
16 16
 #define FIFO_VERSION "version"
17 17
 
18
+#define MAX_CTIME_LEN 128
19
+
18 20
 typedef int (fifo_cmd)( FILE *fifo_stream, char *response_file );
19 21
 
20 22
 struct fifo_command{
Browse code

New FIFO using fifo_reply and fixing previous shortcomings in blocking thru unsucessful randez-vous mit FIFO client

Jiri Kuthan authored on 03/09/2002 08:38:00
Showing 1 changed files
... ...
@@ -43,7 +43,7 @@ int register_core_fifo();
43 43
 FILE *open_reply_pipe( char *pipe_name );
44 44
 
45 45
 /* tell FIFO client an error occured via reply pipe */
46
-void fifo_reply( char *reply_fifo, char *reply_txt);
46
+void fifo_reply( char *reply_fifo, char *reply_fmt, ... );
47 47
 
48 48
 
49 49
 #endif
Browse code

error reporting from FIFO commands introduced

Jiri Kuthan authored on 03/09/2002 02:10:39
Showing 1 changed files
... ...
@@ -42,4 +42,8 @@ int register_core_fifo();
42 42
 
43 43
 FILE *open_reply_pipe( char *pipe_name );
44 44
 
45
+/* tell FIFO client an error occured via reply pipe */
46
+void fifo_reply( char *reply_fifo, char *reply_txt);
47
+
48
+
45 49
 #endif
Browse code

FIFO support for version added

Jiri Kuthan authored on 30/08/2002 22:10:50
Showing 1 changed files
... ...
@@ -13,6 +13,7 @@
13 13
 /* core FIFO command set */
14 14
 #define FIFO_PRINT "print"
15 15
 #define FIFO_UPTIME "uptime"
16
+#define FIFO_VERSION "version"
16 17
 
17 18
 typedef int (fifo_cmd)( FILE *fifo_stream, char *response_file );
18 19
 
Browse code

uac changed to include From parameter dlg_t typedef created fifo_uac now excpects a request to be terminated with ".<EoL>"

Jiri Kuthan authored on 26/08/2002 19:03:25
Showing 1 changed files
... ...
@@ -31,6 +31,8 @@ int read_line( char *b, int max, FILE *stream, int *read );
31 31
 int read_eol( FILE *stream );
32 32
 /* consume a set of EoL-terminated lines terminated by an additional EoL */
33 33
 int read_line_set(char *buf, int max_len, FILE *fifo, int *len);
34
+/* consume a set of EoL-terminated lines terminated by a single dot line */
35
+int read_body(char *buf, int max_len, FILE *fifo, int *len);
34 36
 
35 37
 int open_fifo_server();
36 38
 
Browse code

Added more stats

Jiri Kuthan authored on 20/08/2002 00:19:05
Showing 1 changed files
... ...
@@ -10,6 +10,10 @@
10 10
 
11 11
 #define CMD_SEPARATOR ':'
12 12
 
13
+/* core FIFO command set */
14
+#define FIFO_PRINT "print"
15
+#define FIFO_UPTIME "uptime"
16
+
13 17
 typedef int (fifo_cmd)( FILE *fifo_stream, char *response_file );
14 18
 
15 19
 struct fifo_command{
... ...
@@ -30,5 +34,9 @@ int read_line_set(char *buf, int max_len, FILE *fifo, int *len);
30 34
 
31 35
 int open_fifo_server();
32 36
 
33
-int print_fifo_cmd( FILE *stream, char *response_file );
37
+/* regsiter core FIFO command set */
38
+int register_core_fifo();
39
+
40
+FILE *open_reply_pipe( char *pipe_name );
41
+
34 42
 #endif
Browse code

bignag change -- lot of things primarily added in relationship with refurbushing TM; see [sr] archive (2002-08-14) -- "ser update" and "TM update" for a long list of details

Jiri Kuthan authored on 15/08/2002 08:13:29
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,34 @@
1
+/*
2
+ * $Id$
3
+ *
4
+ */
5
+
6
+#ifndef _FIFO_SERVER_H
7
+#define _FIFO_SERVER_H
8
+
9
+#include <stdio.h>
10
+
11
+#define CMD_SEPARATOR ':'
12
+
13
+typedef int (fifo_cmd)( FILE *fifo_stream, char *response_file );
14
+
15
+struct fifo_command{
16
+	fifo_cmd *f;
17
+	struct fifo_command *next;
18
+	void *param;
19
+	char *name;
20
+};
21
+
22
+int register_fifo_cmd(fifo_cmd f, char *cmd_name, void *param);
23
+
24
+/* read a single EoL-terminated line from fifo */
25
+int read_line( char *b, int max, FILE *stream, int *read );
26
+/* consume EoL from fifo */
27
+int read_eol( FILE *stream );
28
+/* consume a set of EoL-terminated lines terminated by an additional EoL */
29
+int read_line_set(char *buf, int max_len, FILE *fifo, int *len);
30
+
31
+int open_fifo_server();
32
+
33
+int print_fifo_cmd( FILE *stream, char *response_file );
34
+#endif