Browse code

modules_k/*: moved k modules in directory modules/

Daniel-Constantin Mierla authored on 20/01/2013 11:57:52
Showing 1 changed files
1 1
deleted file mode 100644
... ...
@@ -1,95 +0,0 @@
1
-/* $Id$
2
- *
3
- * Copyright (C) 2006-2007 VozTelecom Sistemas S.L
4
- *
5
- * This file is part of Kamailio, a free SIP server.
6
- *
7
- * Kamailio is free software; you can redistribute it and/or modify
8
- * it under the terms of the GNU General Public License as published by
9
- * the Free Software Foundation; either version 2 of the License, or
10
- * (at your option) any later version
11
- *
12
- * Kamailio is distributed in the hope that it will be useful,
13
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
- * GNU General Public License for more details.
16
- *
17
- * You should have received a copy of the GNU General Public License 
18
- * along with this program; if not, write to the Free Software 
19
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
20
- */
21
-
22
-#include <sys/time.h>
23
-#include <time.h>
24
-#include "../../hashes.h"/* for TABLE_ENTRIES define*/
25
-#include "../../locking.h"/* for TABLE_ENTRIES define*/
26
-#include "../../modules/tm/h_table.h"/* for struct cell*/
27
-#define STATS_CELLS 50
28
-#define UAS_T 0
29
-#define UAC_T 1
30
-/**
31
- * stores statistics about a given APP SERVER,
32
- * for instance, how much it lasted to respond to
33
- * a given incoming request transaction, how many requests went in
34
- * and how many responses went out, etc.
35
- * this should be about... 16*4+20*4+4 bytes...64+80+4=148 bytes each cell
36
- */
37
-struct statscell
38
-{
39
-   /** 0 = UAS, 1 = UAC*/
40
-   char type;
41
-   /**difference between a request_event and a reply_action*/
42
-   union {
43
-      struct {
44
-	 struct timeval as_relay;
45
-	 struct timeval event_sent;
46
-	 struct timeval action_recvd;
47
-      } uas;
48
-      struct {
49
-	 struct timeval action_recvd;
50
-	 struct timeval event_sent;
51
-	 struct timeval action_reply_sent;
52
-      } uac;
53
-   }u;
54
-};
55
-
56
-/** Transactions statistics table */
57
-struct statstable
58
-{
59
-   gen_lock_t *mutex;
60
-   unsigned int dispatch[15];
61
-   unsigned int event[15];
62
-   unsigned int action[15];
63
-   unsigned int started_transactions;
64
-   unsigned int finished_transactions;
65
-   unsigned int received_replies;
66
-   unsigned int received;
67
-};
68
-
69
-extern struct statstable *seas_stats_table;
70
-
71
-/**
72
- * Initialize and destroy statistics table
73
- */
74
-struct statstable* init_seas_stats_table(void);
75
-inline int stop_stats_server(void);
76
-inline void destroy_seas_stats_table(void);
77
-/** Statistics server process
78
- * functions
79
- */
80
-void serve_stats(int fd);
81
-int start_stats_server(char *socket);
82
-inline int print_stats_info(int f,int sock);
83
-/**
84
- * Statistics functions
85
- */
86
-inline void as_relay_stat(struct cell *t);
87
-inline void event_stat(struct cell *t);
88
-inline void action_stat(struct cell *t);
89
-inline void stats_reply(void);
90
-#define receivedplus() \
91
-   do{ \
92
-      lock_get(seas_stats_table->mutex); \
93
-      seas_stats_table->received++; \
94
-      lock_release(seas_stats_table->mutex); \
95
-   }while(0)
Browse code

lib/kcore: cleaned up unused code

- local route and errinfo related code were not used for long time
- also moved some bits of code to more appropriate location

Daniel-Constantin Mierla authored on 10/02/2012 12:42:59
Showing 1 changed files
... ...
@@ -21,7 +21,7 @@
21 21
 
22 22
 #include <sys/time.h>
23 23
 #include <time.h>
24
-#include "../../lib/kcore/hash_func.h"/* for TABLE_ENTRIES define*/
24
+#include "../../hashes.h"/* for TABLE_ENTRIES define*/
25 25
 #include "../../locking.h"/* for TABLE_ENTRIES define*/
26 26
 #include "../../modules/tm/h_table.h"/* for struct cell*/
27 27
 #define STATS_CELLS 50
Browse code

seas: fixed header-encoding for longest headers

-refactorings for newer sip-router TM apis
-some headers longer than 255 bytes were wrongly encoded

Elias Baixas authored on 04/10/2010 10:39:46
Showing 1 changed files
... ...
@@ -52,6 +52,7 @@ struct statscell
52 52
       } uac;
53 53
    }u;
54 54
 };
55
+
55 56
 /** Transactions statistics table */
56 57
 struct statstable
57 58
 {
... ...
@@ -64,6 +65,7 @@ struct statstable
64 65
    unsigned int received_replies;
65 66
    unsigned int received;
66 67
 };
68
+
67 69
 extern struct statstable *seas_stats_table;
68 70
 
69 71
 /**
Browse code

Fix relative paths to tm header files.

This patch fixes relative paths to header files included from the tm
module. The module is located in sip-router/modules which kamailio
modules are in sip-router/modules_k, thus we have to replace ../tm/
with ../../modules/tm/.

Jan Janak authored on 15/04/2009 15:09:42
Showing 1 changed files
... ...
@@ -23,7 +23,7 @@
23 23
 #include <time.h>
24 24
 #include "../../lib/kcore/hash_func.h"/* for TABLE_ENTRIES define*/
25 25
 #include "../../locking.h"/* for TABLE_ENTRIES define*/
26
-#include "../tm/h_table.h"/* for struct cell*/
26
+#include "../../modules/tm/h_table.h"/* for struct cell*/
27 27
 #define STATS_CELLS 50
28 28
 #define UAS_T 0
29 29
 #define UAC_T 1
Browse code

Update module to use hash_func.h from libkcore

This patch does two things:
* It links the module with the shared library libkcore (if not yet done)
which contains all the stuff that was present in kamailio core and
is missing from the sip-router core.
* it fixes the path to hash_func.h to point to the header in the shared
library.

Jan Janak authored on 03/03/2009 17:23:11
Showing 1 changed files
... ...
@@ -21,7 +21,7 @@
21 21
 
22 22
 #include <sys/time.h>
23 23
 #include <time.h>
24
-#include "../../hash_func.h"/* for TABLE_ENTRIES define*/
24
+#include "../../lib/kcore/hash_func.h"/* for TABLE_ENTRIES define*/
25 25
 #include "../../locking.h"/* for TABLE_ENTRIES define*/
26 26
 #include "../tm/h_table.h"/* for struct cell*/
27 27
 #define STATS_CELLS 50
Browse code

- sync function definitions with declarations for functions w/o parameters - this functions were declared as 'f()', that means they can have a arbitrary number of arguments (because of compatibility to the old style definitions in the C standard), even if they are defined as f(void) - there is no warning reported if somebody call a function like this with some parameters - another potential problem is, when somebody change the definition to accept some parameter, but forgot to change also the declaration. Then the compiler will not report wrong usage of this functions too. - sometimes ago the '-Wold-style-definition' warning was introduced, the definitions get then fixed subsequently, but not all declarations

git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@5003 689a6050-402a-0410-94f2-e92a70836424

Henning Westerholt authored on 26/09/2008 11:01:51
Showing 1 changed files
... ...
@@ -69,9 +69,9 @@ extern struct statstable *seas_stats_table;
69 69
 /**
70 70
  * Initialize and destroy statistics table
71 71
  */
72
-struct statstable* init_seas_stats_table();
73
-inline int stop_stats_server();
74
-inline void destroy_seas_stats_table();
72
+struct statstable* init_seas_stats_table(void);
73
+inline int stop_stats_server(void);
74
+inline void destroy_seas_stats_table(void);
75 75
 /** Statistics server process
76 76
  * functions
77 77
  */
... ...
@@ -84,7 +84,7 @@ inline int print_stats_info(int f,int sock);
84 84
 inline void as_relay_stat(struct cell *t);
85 85
 inline void event_stat(struct cell *t);
86 86
 inline void action_stat(struct cell *t);
87
-inline void stats_reply();
87
+inline void stats_reply(void);
88 88
 #define receivedplus() \
89 89
    do{ \
90 90
       lock_get(seas_stats_table->mutex); \
Browse code

- change name in copyright headers

git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@4518 689a6050-402a-0410-94f2-e92a70836424

Henning Westerholt authored on 28/07/2008 15:39:28
Showing 1 changed files
... ...
@@ -2,14 +2,14 @@
2 2
  *
3 3
  * Copyright (C) 2006-2007 VozTelecom Sistemas S.L
4 4
  *
5
- * This file is part of openser, a free SIP server.
5
+ * This file is part of Kamailio, a free SIP server.
6 6
  *
7
- * openser is free software; you can redistribute it and/or modify
7
+ * Kamailio is free software; you can redistribute it and/or modify
8 8
  * it under the terms of the GNU General Public License as published by
9 9
  * the Free Software Foundation; either version 2 of the License, or
10 10
  * (at your option) any later version
11 11
  *
12
- * openser is distributed in the hope that it will be useful,
12
+ * Kamailio is distributed in the hope that it will be useful,
13 13
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 14
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 15
  * GNU General Public License for more details.
Browse code

- code cleanup and bugfixes: some errors and warnings from '-Wextra -Wredundant-decls' - remove redundant variable and function definition in mangler and flatstore - fix comparison of unsigned variable < 0 in if-case in cfgutils - remove redundant variable definitions in seas - change variable to signed to really reach an error case and remove an empty else case in seas - remove redundant variable and function definition in registrar, domain and tm

git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@2188 689a6050-402a-0410-94f2-e92a70836424

Henning Westerholt authored on 10/05/2007 15:34:09
Showing 1 changed files
... ...
@@ -65,7 +65,6 @@ struct statstable
65 65
    unsigned int received;
66 66
 };
67 67
 extern struct statstable *seas_stats_table;
68
-extern char use_stats;
69 68
 
70 69
 /**
71 70
  * Initialize and destroy statistics table
Browse code

- added license and copyright

git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@1819 689a6050-402a-0410-94f2-e92a70836424

Daniel-Constantin Mierla authored on 11/03/2007 19:20:59
Showing 1 changed files
... ...
@@ -1,4 +1,24 @@
1
-/* $Id$ */
1
+/* $Id$
2
+ *
3
+ * Copyright (C) 2006-2007 VozTelecom Sistemas S.L
4
+ *
5
+ * This file is part of openser, a free SIP server.
6
+ *
7
+ * openser is free software; you can redistribute it and/or modify
8
+ * it under the terms of the GNU General Public License as published by
9
+ * the Free Software Foundation; either version 2 of the License, or
10
+ * (at your option) any later version
11
+ *
12
+ * openser is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
+ * GNU General Public License for more details.
16
+ *
17
+ * You should have received a copy of the GNU General Public License 
18
+ * along with this program; if not, write to the Free Software 
19
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
20
+ */
21
+
2 22
 #include <sys/time.h>
3 23
 #include <time.h>
4 24
 #include "../../hash_func.h"/* for TABLE_ENTRIES define*/
Browse code

fixed several warning and incomplete initializers

git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@1808 689a6050-402a-0410-94f2-e92a70836424

Bogdan-Andrei Iancu authored on 10/03/2007 17:36:19
Showing 1 changed files
... ...
@@ -51,8 +51,8 @@ extern char use_stats;
51 51
  * Initialize and destroy statistics table
52 52
  */
53 53
 struct statstable* init_seas_stats_table();
54
-int inline stop_stats_server();
55
-void inline destroy_seas_stats_table();
54
+inline int stop_stats_server();
55
+inline void destroy_seas_stats_table();
56 56
 /** Statistics server process
57 57
  * functions
58 58
  */
Browse code

Added code files for SEAS module

git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@1448 689a6050-402a-0410-94f2-e92a70836424

Elias Baixas authored on 22/12/2006 17:07:44
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,74 @@
1
+/* $Id$ */
2
+#include <sys/time.h>
3
+#include <time.h>
4
+#include "../../hash_func.h"/* for TABLE_ENTRIES define*/
5
+#include "../../locking.h"/* for TABLE_ENTRIES define*/
6
+#include "../tm/h_table.h"/* for struct cell*/
7
+#define STATS_CELLS 50
8
+#define UAS_T 0
9
+#define UAC_T 1
10
+/**
11
+ * stores statistics about a given APP SERVER,
12
+ * for instance, how much it lasted to respond to
13
+ * a given incoming request transaction, how many requests went in
14
+ * and how many responses went out, etc.
15
+ * this should be about... 16*4+20*4+4 bytes...64+80+4=148 bytes each cell
16
+ */
17
+struct statscell
18
+{
19
+   /** 0 = UAS, 1 = UAC*/
20
+   char type;
21
+   /**difference between a request_event and a reply_action*/
22
+   union {
23
+      struct {
24
+	 struct timeval as_relay;
25
+	 struct timeval event_sent;
26
+	 struct timeval action_recvd;
27
+      } uas;
28
+      struct {
29
+	 struct timeval action_recvd;
30
+	 struct timeval event_sent;
31
+	 struct timeval action_reply_sent;
32
+      } uac;
33
+   }u;
34
+};
35
+/** Transactions statistics table */
36
+struct statstable
37
+{
38
+   gen_lock_t *mutex;
39
+   unsigned int dispatch[15];
40
+   unsigned int event[15];
41
+   unsigned int action[15];
42
+   unsigned int started_transactions;
43
+   unsigned int finished_transactions;
44
+   unsigned int received_replies;
45
+   unsigned int received;
46
+};
47
+extern struct statstable *seas_stats_table;
48
+extern char use_stats;
49
+
50
+/**
51
+ * Initialize and destroy statistics table
52
+ */
53
+struct statstable* init_seas_stats_table();
54
+int inline stop_stats_server();
55
+void inline destroy_seas_stats_table();
56
+/** Statistics server process
57
+ * functions
58
+ */
59
+void serve_stats(int fd);
60
+int start_stats_server(char *socket);
61
+inline int print_stats_info(int f,int sock);
62
+/**
63
+ * Statistics functions
64
+ */
65
+inline void as_relay_stat(struct cell *t);
66
+inline void event_stat(struct cell *t);
67
+inline void action_stat(struct cell *t);
68
+inline void stats_reply();
69
+#define receivedplus() \
70
+   do{ \
71
+      lock_get(seas_stats_table->mutex); \
72
+      seas_stats_table->received++; \
73
+      lock_release(seas_stats_table->mutex); \
74
+   }while(0)