Browse code

core - test: reorganized the old files in test folder

- moved to subfolders in test/misc
- keep content of the test folder cleaner for travis and unit tests

Daniel-Constantin Mierla authored on 26/11/2015 22:30:51
Showing 1 changed files
1 1
deleted file mode 100644
... ...
@@ -1,78 +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
-
23
-#include <stdlib.h>
24
-#include <stdio.h>
25
-#include <string.h>
26
-#include <sys/types.h>
27
-#include <sys/socket.h>
28
-#include <netinet/in.h>
29
-#include <errno.h>
30
-#include <arpa/inet.h>
31
-
32
-
33
-#define LOOP_COUNT 100
34
-#define PORT 5060
35
-#define SEND_PORT 5090
36
-#define SEND_ADDR 0x0a000022 /*10.0.0.34*/   /*   0x7f000001 127.0.0.1*/
37
-#define BUF_SIZE 65535
38
-static char buf[BUF_SIZE];
39
-
40
-int main(char** argv, int argn)
41
-{
42
-	int sock;
43
-	struct sockaddr_in addr;
44
-	struct sockaddr_in to;
45
-	int r, len;
46
-
47
-	printf("starting\n");
48
-	
49
-	addr.sin_family=AF_INET;
50
-	addr.sin_port=htons(PORT);
51
-	addr.sin_addr.s_addr=INADDR_ANY;
52
-	to.sin_family=AF_INET;
53
-	to.sin_port=htons(SEND_PORT);
54
-	to.sin_addr.s_addr=htonl(SEND_ADDR);
55
-		
56
-
57
-	sock=socket(PF_INET, SOCK_DGRAM,0);
58
-	if (bind(sock, (struct sockaddr*) &addr, sizeof(struct sockaddr_in))==-1){
59
-		fprintf(stderr, "ERROR: udp_init: bind: %s\n", strerror(errno));
60
-		exit(1);
61
-	}
62
-
63
-	//if (fork())
64
-		if (fork()){
65
-			close(sock);
66
-			for(;;) sleep(100);
67
-			exit(1);
68
-		}
69
-	/*children*/
70
-	printf("child\n");
71
-	for(;;){
72
-		len=read(sock, buf, BUF_SIZE);
73
-		/*for (r=0;r < LOOP_COUNT; r++);*/
74
-		/* send it back*/
75
-		sendto(sock, buf, len, 0, (struct sockaddr*) &to,
76
-				sizeof(struct sockaddr_in));
77
-	}
78
-}
Browse code

test: Remove SVN ID's

Olle E. Johansson authored on 07/03/2015 19:43:49
Showing 1 changed files
... ...
@@ -1,22 +1,14 @@
1 1
 /* 
2
- * $Id$
3
- *
4
- *
5 2
  * Copyright (C) 2001-2003 FhG Fokus
6 3
  *
7
- * This file is part of ser, a free SIP server.
4
+ * This file is part of Kamailio, a free SIP server.
8 5
  *
9
- * ser is free software; you can redistribute it and/or modify
6
+ * Kamailio is free software; you can redistribute it and/or modify
10 7
  * it under the terms of the GNU General Public License as published by
11 8
  * the Free Software Foundation; either version 2 of the License, or
12 9
  * (at your option) any later version
13 10
  *
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,
11
+ * Kamailio is distributed in the hope that it will be useful,
20 12
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 13
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22 14
  * GNU General Public License for more details.
Browse code

all: updated FSF address in GPL text

Anthony Messina authored on 04/07/2014 09:36:37 • Daniel-Constantin Mierla committed on 04/07/2014 09:37:36
Showing 1 changed files
... ...
@@ -23,7 +23,7 @@
23 23
  *
24 24
  * You should have received a copy of the GNU General Public License 
25 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
26
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
27 27
  */
28 28
 
29 29
 
Browse code

- Spelling checked

Jan Janak authored on 24/08/2004 09:01:24
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
  *
Browse code

GPLization banner introduced to *.[hc] files

Jiri Kuthan authored on 19/09/2002 12:23:52
Showing 1 changed files
... ...
@@ -1,9 +1,33 @@
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
 
6 29
 
30
+
7 31
 #include <stdlib.h>
8 32
 #include <stdio.h>
9 33
 #include <string.h>
Browse code

CVS substitutes introduced

Jiri Kuthan authored on 19/09/2002 11:51:26
Showing 1 changed files
... ...
@@ -1,3 +1,9 @@
1
+/* 
2
+ * $Id$
3
+ *
4
+ */
5
+
6
+
1 7
 #include <stdlib.h>
2 8
 #include <stdio.h>
3 9
 #include <string.h>
Browse code

- new test utility & configs

Andrei Pelinescu-Onciul authored on 15/02/2002 00:09:13
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,56 @@
1
+#include <stdlib.h>
2
+#include <stdio.h>
3
+#include <string.h>
4
+#include <sys/types.h>
5
+#include <sys/socket.h>
6
+#include <netinet/in.h>
7
+#include <errno.h>
8
+#include <arpa/inet.h>
9
+
10
+
11
+#define LOOP_COUNT 100
12
+#define PORT 5060
13
+#define SEND_PORT 5090
14
+#define SEND_ADDR 0x0a000022 /*10.0.0.34*/   /*   0x7f000001 127.0.0.1*/
15
+#define BUF_SIZE 65535
16
+static char buf[BUF_SIZE];
17
+
18
+int main(char** argv, int argn)
19
+{
20
+	int sock;
21
+	struct sockaddr_in addr;
22
+	struct sockaddr_in to;
23
+	int r, len;
24
+
25
+	printf("starting\n");
26
+	
27
+	addr.sin_family=AF_INET;
28
+	addr.sin_port=htons(PORT);
29
+	addr.sin_addr.s_addr=INADDR_ANY;
30
+	to.sin_family=AF_INET;
31
+	to.sin_port=htons(SEND_PORT);
32
+	to.sin_addr.s_addr=htonl(SEND_ADDR);
33
+		
34
+
35
+	sock=socket(PF_INET, SOCK_DGRAM,0);
36
+	if (bind(sock, (struct sockaddr*) &addr, sizeof(struct sockaddr_in))==-1){
37
+		fprintf(stderr, "ERROR: udp_init: bind: %s\n", strerror(errno));
38
+		exit(1);
39
+	}
40
+
41
+	//if (fork())
42
+		if (fork()){
43
+			close(sock);
44
+			for(;;) sleep(100);
45
+			exit(1);
46
+		}
47
+	/*children*/
48
+	printf("child\n");
49
+	for(;;){
50
+		len=read(sock, buf, BUF_SIZE);
51
+		/*for (r=0;r < LOOP_COUNT; r++);*/
52
+		/* send it back*/
53
+		sendto(sock, buf, len, 0, (struct sockaddr*) &to,
54
+				sizeof(struct sockaddr_in));
55
+	}
56
+}