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,78 +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
-/*
23
- * =====================================================================================
24
- * 
25
- *        Filename:  encode_content_length.c
26
- * 
27
- *     Description:  Function to encode content-length headers.
28
- * 
29
- *         Version:  1.0
30
- *         Created:  21/11/05 02:02:58 CET
31
- *        Revision:  none
32
- *        Compiler:  gcc
33
- * 
34
- *          Author:  Elias Baixas (EB), elias@conillera.net
35
- *         Company:  VozTele.com
36
- * 
37
- * =====================================================================================
38
- */
39
-
40
-#define _GNU_SOURCE
41
-#include <stdio.h>
42
-#include <string.h>
43
-#include <netinet/in.h>
44
-
45
-/*
46
- * Encodes a content-length header.
47
- * encoding is as follows:
48
- * 1: length of the payload.
49
- * N: Network-Byte-Ordered(little endian) of the
50
- * multibyte number represeting the length (now, it is
51
- * a long integer)
52
- */
53
-int encode_contentlength(char *hdr,int hdrlen,long int len,char *where)
54
-{
55
-   long int longint;
56
-
57
-   longint = htonl(len);
58
-   where[0]=sizeof(long int);
59
-   memcpy(&where[1],&longint,sizeof(long int));
60
-   return 1+sizeof(long int);
61
-
62
-}
63
-
64
-int print_encoded_contentlength(FILE *fd,char *hdr,int hdrlen,unsigned char *payload,int paylen,char *prefix)
65
-{
66
-   long int content_length;
67
-   int i;
68
-
69
-   memcpy(&content_length,&payload[1],payload[0]);
70
-   content_length=ntohl(content_length);
71
-
72
-   fprintf(fd,"%s",prefix);
73
-   for(i=0;i<paylen;i++)
74
-      fprintf(fd,"%s%d%s",i==0?"ENCODED CONTENT LENGTH BODY:[":":",payload[i],i==paylen-1?"]\n":"");
75
-   fprintf(fd,"%s  CONTENT LENGTH=[%d]\n",prefix,(int)content_length);
76
-   return 1;
77
-}
78
-
Browse code

Replaced dprintf for fprintf (dprintf is somewhat gnu-specific and does not compile on Mac). even though it was just used for debugging (not on the module) it prevented compilation

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

Elias Baixas authored on 13/11/2008 10:18:48
Showing 1 changed files
... ...
@@ -61,7 +61,7 @@ int encode_contentlength(char *hdr,int hdrlen,long int len,char *where)
61 61
 
62 62
 }
63 63
 
64
-int print_encoded_contentlength(int fd,char *hdr,int hdrlen,unsigned char *payload,int paylen,char *prefix)
64
+int print_encoded_contentlength(FILE *fd,char *hdr,int hdrlen,unsigned char *payload,int paylen,char *prefix)
65 65
 {
66 66
    long int content_length;
67 67
    int i;
... ...
@@ -69,10 +69,10 @@ int print_encoded_contentlength(int fd,char *hdr,int hdrlen,unsigned char *paylo
69 69
    memcpy(&content_length,&payload[1],payload[0]);
70 70
    content_length=ntohl(content_length);
71 71
 
72
-   dprintf(fd,"%s",prefix);
72
+   fprintf(fd,"%s",prefix);
73 73
    for(i=0;i<paylen;i++)
74
-      dprintf(fd,"%s%d%s",i==0?"ENCODED CONTENT LENGTH BODY:[":":",payload[i],i==paylen-1?"]\n":"");
75
-   dprintf(fd,"%s  CONTENT LENGTH=[%d]\n",prefix,(int)content_length);
74
+      fprintf(fd,"%s%d%s",i==0?"ENCODED CONTENT LENGTH BODY:[":":",payload[i],i==paylen-1?"]\n":"");
75
+   fprintf(fd,"%s  CONTENT LENGTH=[%d]\n",prefix,(int)content_length);
76 76
    return 1;
77 77
 }
78 78
 
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

- 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
 /*
3 23
  * =====================================================================================
4 24
  * 
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,58 @@
1
+/* $Id$ */
2
+/*
3
+ * =====================================================================================
4
+ * 
5
+ *        Filename:  encode_content_length.c
6
+ * 
7
+ *     Description:  Function to encode content-length headers.
8
+ * 
9
+ *         Version:  1.0
10
+ *         Created:  21/11/05 02:02:58 CET
11
+ *        Revision:  none
12
+ *        Compiler:  gcc
13
+ * 
14
+ *          Author:  Elias Baixas (EB), elias@conillera.net
15
+ *         Company:  VozTele.com
16
+ * 
17
+ * =====================================================================================
18
+ */
19
+
20
+#define _GNU_SOURCE
21
+#include <stdio.h>
22
+#include <string.h>
23
+#include <netinet/in.h>
24
+
25
+/*
26
+ * Encodes a content-length header.
27
+ * encoding is as follows:
28
+ * 1: length of the payload.
29
+ * N: Network-Byte-Ordered(little endian) of the
30
+ * multibyte number represeting the length (now, it is
31
+ * a long integer)
32
+ */
33
+int encode_contentlength(char *hdr,int hdrlen,long int len,char *where)
34
+{
35
+   long int longint;
36
+
37
+   longint = htonl(len);
38
+   where[0]=sizeof(long int);
39
+   memcpy(&where[1],&longint,sizeof(long int));
40
+   return 1+sizeof(long int);
41
+
42
+}
43
+
44
+int print_encoded_contentlength(int fd,char *hdr,int hdrlen,unsigned char *payload,int paylen,char *prefix)
45
+{
46
+   long int content_length;
47
+   int i;
48
+
49
+   memcpy(&content_length,&payload[1],payload[0]);
50
+   content_length=ntohl(content_length);
51
+
52
+   dprintf(fd,"%s",prefix);
53
+   for(i=0;i<paylen;i++)
54
+      dprintf(fd,"%s%d%s",i==0?"ENCODED CONTENT LENGTH BODY:[":":",payload[i],i==paylen-1?"]\n":"");
55
+   dprintf(fd,"%s  CONTENT LENGTH=[%d]\n",prefix,(int)content_length);
56
+   return 1;
57
+}
58
+