- new folder src/ to hold the source code for main project applications
- main.c is in src/
- all core files are subfolder are in src/core/
- modules are in src/modules/
- libs are in src/lib/
- application Makefiles are in src/
- application binary is built in src/ (src/kamailio)
1 | 1 |
deleted file mode 100644 |
... | ... |
@@ -1,49 +0,0 @@ |
1 |
-/* |
|
2 |
- * Copyright (C) 2001-2003 FhG Fokus |
|
3 |
- * |
|
4 |
- * This file is part of Kamailio, a free SIP server. |
|
5 |
- * |
|
6 |
- * Kamailio is free software; you can redistribute it and/or modify |
|
7 |
- * it under the terms of the GNU General Public License as published by |
|
8 |
- * the Free Software Foundation; either version 2 of the License, or |
|
9 |
- * (at your option) any later version |
|
10 |
- * |
|
11 |
- * Kamailio is distributed in the hope that it will be useful, |
|
12 |
- * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
13 |
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
14 |
- * GNU General Public License for more details. |
|
15 |
- * |
|
16 |
- * You should have received a copy of the GNU General Public License |
|
17 |
- * along with this program; if not, write to the Free Software |
|
18 |
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
|
19 |
- */ |
|
20 |
- |
|
21 |
-/*! |
|
22 |
- * \file |
|
23 |
- * \brief Kamailio core :: Handle the signals |
|
24 |
- * \ingroup core |
|
25 |
- * Module: \ref core |
|
26 |
- */ |
|
27 |
- |
|
28 |
-#include "signals.h" |
|
29 |
-#include "dprint.h" |
|
30 |
- |
|
31 |
-#include <signal.h> |
|
32 |
-#include <string.h> /* memset */ |
|
33 |
- |
|
34 |
-#ifdef USE_SIGACTION |
|
35 |
-void (*set_sig_h(int sig, void (*handler) (int) ))(int) |
|
36 |
-{ |
|
37 |
- struct sigaction act; |
|
38 |
- struct sigaction old; |
|
39 |
- |
|
40 |
- memset(&act, 0, sizeof(act)); |
|
41 |
- act.sa_handler=handler; |
|
42 |
- /* |
|
43 |
- sigemptyset(&act.sa_mask); |
|
44 |
- act.sa_flags=0; |
|
45 |
- */ |
|
46 |
- /* sa_sigaction not set, we use sa_hanlder instead */ |
|
47 |
- return (sigaction (sig, &act, &old)==-1)?SIG_ERR:old.sa_handler; |
|
48 |
-} |
|
49 |
-#endif |
... | ... |
@@ -8,11 +8,6 @@ |
8 | 8 |
* the Free Software Foundation; either version 2 of the License, or |
9 | 9 |
* (at your option) any later version |
10 | 10 |
* |
11 |
- * For a license to use the ser software under conditions |
|
12 |
- * other than those described here, or to purchase support for this |
|
13 |
- * software, please contact iptel.org by e-mail at the following addresses: |
|
14 |
- * info@iptel.org |
|
15 |
- * |
|
16 | 11 |
* Kamailio is distributed in the hope that it will be useful, |
17 | 12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
18 | 13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
... | ... |
@@ -1,11 +1,9 @@ |
1 | 1 |
/* |
2 |
- * $Id$ |
|
3 |
- * |
|
4 | 2 |
* Copyright (C) 2001-2003 FhG Fokus |
5 | 3 |
* |
6 |
- * This file is part of ser, a free SIP server. |
|
4 |
+ * This file is part of Kamailio, a free SIP server. |
|
7 | 5 |
* |
8 |
- * ser is free software; you can redistribute it and/or modify |
|
6 |
+ * Kamailio is free software; you can redistribute it and/or modify |
|
9 | 7 |
* it under the terms of the GNU General Public License as published by |
10 | 8 |
* the Free Software Foundation; either version 2 of the License, or |
11 | 9 |
* (at your option) any later version |
... | ... |
@@ -15,7 +13,7 @@ |
15 | 13 |
* software, please contact iptel.org by e-mail at the following addresses: |
16 | 14 |
* info@iptel.org |
17 | 15 |
* |
18 |
- * ser is distributed in the hope that it will be useful, |
|
16 |
+ * Kamailio is distributed in the hope that it will be useful, |
|
19 | 17 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
20 | 18 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
21 | 19 |
* GNU General Public License for more details. |
... | ... |
@@ -24,17 +22,10 @@ |
24 | 22 |
* along with this program; if not, write to the Free Software |
25 | 23 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
26 | 24 |
*/ |
27 |
-/* |
|
28 |
- * Handle the signals |
|
29 |
- * |
|
30 |
- * History: |
|
31 |
- * -------- |
|
32 |
- * 2005-10-05 split from main.c (andrei) |
|
33 |
- */ |
|
34 | 25 |
|
35 | 26 |
/*! |
36 | 27 |
* \file |
37 |
- * \brief SIP-router core :: |
|
28 |
+ * \brief Kamailio core :: Handle the signals |
|
38 | 29 |
* \ingroup core |
39 | 30 |
* Module: \ref core |
40 | 31 |
*/ |
... | ... |
@@ -22,7 +22,7 @@ |
22 | 22 |
* |
23 | 23 |
* You should have received a copy of the GNU General Public License |
24 | 24 |
* along with this program; if not, write to the Free Software |
25 |
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
25 |
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
|
26 | 26 |
*/ |
27 | 27 |
/* |
28 | 28 |
* Handle the signals |
Please fill in after the :: to explain the function of this file.
... | ... |
@@ -33,7 +33,10 @@ |
33 | 33 |
*/ |
34 | 34 |
|
35 | 35 |
#include "signals.h" |
36 |
+#include "dprint.h" |
|
37 |
+ |
|
36 | 38 |
#include <signal.h> |
39 |
+#include <string.h> /* memset */ |
|
37 | 40 |
|
38 | 41 |
#ifdef USE_SIGACTION |
39 | 42 |
void (*set_sig_h(int sig, void (*handler) (int) ))(int) |
... | ... |
@@ -47,7 +50,6 @@ void (*set_sig_h(int sig, void (*handler) (int) ))(int) |
47 | 50 |
sigemptyset(&act.sa_mask); |
48 | 51 |
act.sa_flags=0; |
49 | 52 |
*/ |
50 |
- LOG(L_CRIT, "setting signal %d to %p\n", sig, handler); |
|
51 | 53 |
/* sa_sigaction not set, we use sa_hanlder instead */ |
52 | 54 |
return (sigaction (sig, &act, &old)==-1)?SIG_ERR:old.sa_handler; |
53 | 55 |
} |
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,54 @@ |
1 |
+/* |
|
2 |
+ * $Id$ |
|
3 |
+ * |
|
4 |
+ * Copyright (C) 2001-2003 FhG Fokus |
|
5 |
+ * |
|
6 |
+ * This file is part of ser, a free SIP server. |
|
7 |
+ * |
|
8 |
+ * ser is free software; you can redistribute it and/or modify |
|
9 |
+ * it under the terms of the GNU General Public License as published by |
|
10 |
+ * the Free Software Foundation; either version 2 of the License, or |
|
11 |
+ * (at your option) any later version |
|
12 |
+ * |
|
13 |
+ * For a license to use the ser software under conditions |
|
14 |
+ * other than those described here, or to purchase support for this |
|
15 |
+ * software, please contact iptel.org by e-mail at the following addresses: |
|
16 |
+ * info@iptel.org |
|
17 |
+ * |
|
18 |
+ * ser is distributed in the hope that it will be useful, |
|
19 |
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
20 |
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
21 |
+ * GNU General Public License for more details. |
|
22 |
+ * |
|
23 |
+ * You should have received a copy of the GNU General Public License |
|
24 |
+ * along with this program; if not, write to the Free Software |
|
25 |
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
26 |
+ */ |
|
27 |
+/* |
|
28 |
+ * Handle the signals |
|
29 |
+ * |
|
30 |
+ * History: |
|
31 |
+ * -------- |
|
32 |
+ * 2005-10-05 split from main.c (andrei) |
|
33 |
+ */ |
|
34 |
+ |
|
35 |
+#include "signals.h" |
|
36 |
+#include <signal.h> |
|
37 |
+ |
|
38 |
+#ifdef USE_SIGACTION |
|
39 |
+void (*set_sig_h(int sig, void (*handler) (int) ))(int) |
|
40 |
+{ |
|
41 |
+ struct sigaction act; |
|
42 |
+ struct sigaction old; |
|
43 |
+ |
|
44 |
+ memset(&act, 0, sizeof(act)); |
|
45 |
+ act.sa_handler=handler; |
|
46 |
+ /* |
|
47 |
+ sigemptyset(&act.sa_mask); |
|
48 |
+ act.sa_flags=0; |
|
49 |
+ */ |
|
50 |
+ LOG(L_CRIT, "setting signal %d to %p\n", sig, handler); |
|
51 |
+ /* sa_sigaction not set, we use sa_hanlder instead */ |
|
52 |
+ return (sigaction (sig, &act, &old)==-1)?SIG_ERR:old.sa_handler; |
|
53 |
+} |
|
54 |
+#endif |