-
Notifications
You must be signed in to change notification settings - Fork 1
/
error.h
99 lines (81 loc) · 2.73 KB
/
error.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
/*
* $Id: error.h 2 2006-11-14 22:37:20Z vingarzan $
*
* Copyright (C) 2001-2003 FhG Fokus
*
* This file is part of ser, a free SIP server.
*
* ser is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version
*
* For a license to use the ser software under conditions
* other than those described here, or to purchase support for this
* software, please contact iptel.org by e-mail at the following addresses:
* info@iptel.org
*
* ser is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef error_h
#define error_h
#define E_OK 0
#define E_UNSPEC -1
#define E_OUT_OF_MEM -2
#define E_BAD_RE -3
/* #define E_BAD_ADDRESS -4 */
#define E_BUG -5
#define E_CFG -6
#define E_NO_SOCKET -7
/* unresolvable topmost Via */
#define E_BAD_VIA -8
/* incomplete transaction tuple */
#define E_BAD_TUPEL -9
/* script programming error */
#define E_SCRIPT -10
/* error in execution of external tools */
#define E_EXEC -11
/* too many branches demanded */
#define E_TOO_MANY_BRANCHES -12
#define E_BAD_TO -13
/* invalid params */
#define E_INVALID_PARAMS -14
#define E_Q_INV_CHAR -15 /* Invalid character in q */
#define E_Q_EMPTY -16 /* Empty q */
#define E_Q_TOO_BIG -17 /* q too big (> 1) */
#define E_Q_DEC_MISSING -18 /* Decimal part missing */
#define E_SEND -477
/* unresolvable next-hop address */
#define E_BAD_ADDRESS -478
/* unparseable URI */
#define E_BAD_URI -479
/* bad protocol, like */
#define E_BAD_PROTO -480
/* malformed request */
#define E_BAD_REQ -400
#define E_CANCELED -487 /* transaction already canceled */
/* error in server */
#define E_BAD_SERVER -500
#define E_ADM_PROHIBITED -510
#define E_BLACKLISTED -520
#define MAX_REASON_LEN 128
#include "str.h"
/* processing status of the last command */
extern int ser_error;
extern int prev_ser_error;
struct sip_msg;
/* ser error -> SIP error */
int err2reason_phrase( int ser_error, int *sip_error,
char *phrase, int etl, char *signature );
/* SIP error core -> SIP text */
char *error_text( int code );
/* return pkg_malloc-ed reply status in status->s */
void get_reply_status( str *status, struct sip_msg *reply, int code );
#endif