Line | Count | Source (jump to first uncovered line) |
1 | | /* |
2 | | * Copyright (C) 2006 Voice Sistem SRL |
3 | | * |
4 | | * This file is part of opensips, a free SIP server. |
5 | | * |
6 | | * opensips 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 | | * opensips 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 | | * History: |
22 | | * --------- |
23 | | * 2006-09-08 first version (bogdan) |
24 | | */ |
25 | | |
26 | | /*! |
27 | | * \file |
28 | | * \brief MI :: Format handling |
29 | | * \ingroup mi |
30 | | */ |
31 | | |
32 | | |
33 | | #include <string.h> |
34 | | #include "../dprint.h" |
35 | | #include "../mem/mem.h" |
36 | | |
37 | | char *mi_fmt_buf = 0; |
38 | | int mi_fmt_buf_len = 0; |
39 | | |
40 | | |
41 | | int mi_fmt_init( unsigned int size ) |
42 | 0 | { |
43 | 0 | mi_fmt_buf = (char*)pkg_malloc(size); |
44 | 0 | if (mi_fmt_buf==NULL) { |
45 | 0 | LM_ERR("no more pkg mem\n"); |
46 | 0 | return -1; |
47 | 0 | } |
48 | 0 | mi_fmt_buf_len = size; |
49 | 0 | return 0; |
50 | 0 | } |
51 | | |
52 | | |