error.h File Reference

Error definitions. More...

#include "str.h"

Include dependency graph for error.h:

Go to the source code of this file.

Defines

#define E_BAD_ADDRESS   -476
#define E_BAD_PROTO   -474
#define E_BAD_RE   -3
#define E_BAD_REQ   -400
#define E_BAD_SERVER   -500
#define E_BAD_TO   -13
#define E_BAD_TUPEL   -9
#define E_BAD_URI   -475
#define E_BAD_VIA   -8
#define E_BUG   -5
#define E_CFG   -6
#define E_EXEC   -11
#define E_INVALID_PARAMS   -14
#define E_IP_BLOCKED   -473
#define E_NO_DESTINATION   -19
#define E_NO_SOCKET   -7
#define E_OUT_OF_MEM   -2
#define E_Q_DEC_MISSING   -18
#define E_Q_EMPTY   -16
#define E_Q_INV_CHAR   -15
#define E_Q_TOO_BIG   -17
#define E_SCRIPT   -10
#define E_SEND   -477
#define E_TOO_MANY_BRANCHES   -12
#define E_UNSPEC   -1
#define MAX_REASON_LEN   128

Functions

int err2reason_phrase (int ser_error, int *sip_error, char *phrase, int etl, char *signature)
 ser error -> SIP error
char * error_text (int code)
 SIP error core -> SIP text.
void get_reply_status (str *status, struct sip_msg *reply, int code)
 return pkg_malloc-ed reply status in status->s

Variables

int prev_ser_error
int ser_error
 processing status of the last command


Detailed Description

Error definitions.

Definition in file error.h.


Define Documentation

#define E_BAD_ADDRESS   -476

unresolvable next-hop address

Definition at line 56 of file error.h.

Referenced by add_uac(), do_action(), err2reason_phrase(), fix_actions(), mk_proxy(), mk_shm_proxy(), t_relay_inerr2scripterr(), t_relay_to(), and uri2su().

#define E_BAD_PROTO   -474

bad protocol, like

Definition at line 54 of file error.h.

#define E_BAD_RE   -3

#define E_BAD_REQ   -400

generic malformed request

Definition at line 59 of file error.h.

Referenced by clen_builder(), err2reason_phrase(), new_t(), parse_headers(), t_newtran(), and t_relay_inerr2scripterr().

#define E_BAD_SERVER   -500

error in server

Definition at line 61 of file error.h.

Referenced by err2reason_phrase().

#define E_BAD_TO   -13

Definition at line 44 of file error.h.

Referenced by err2reason_phrase(), and t_relay_inerr2scripterr().

#define E_BAD_TUPEL   -9

incomplete transaction tuple

Definition at line 40 of file error.h.

Referenced by check_transaction_quadruple(), err2reason_phrase(), and t_newtran().

#define E_BAD_URI   -475

unparseable URI

Definition at line 55 of file error.h.

Referenced by err2reason_phrase(), parse_uri(), and t_relay_inerr2scripterr().

#define E_BAD_VIA   -8

unresolvable topmost Via

Definition at line 39 of file error.h.

Referenced by init_rb(), t_newtran(), t_relay_to(), and w_as_relay_t().

#define E_BUG   -5

#define E_CFG   -6

#define E_EXEC   -11

error in execution of external tools

Definition at line 42 of file error.h.

Referenced by err2reason_phrase(), exec_avp(), exec_msg(), and exec_str().

#define E_INVALID_PARAMS   -14

invalid params

Definition at line 45 of file error.h.

Referenced by dp_trans_fixup(), str2q(), and t_relay_inerr2scripterr().

#define E_IP_BLOCKED   -473

destination filtered

Definition at line 53 of file error.h.

Referenced by err2reason_phrase(), forward_request(), t_forward_nonack(), and t_relay_inerr2scripterr().

#define E_NO_DESTINATION   -19

Decimal part missing

Definition at line 50 of file error.h.

Referenced by t_forward_nonack(), and t_relay_inerr2scripterr().

#define E_NO_SOCKET   -7

Definition at line 38 of file error.h.

Referenced by forward_request(), t_relay_inerr2scripterr(), update_uac_dst(), and uri2sock().

#define E_OUT_OF_MEM   -2

#define E_Q_DEC_MISSING   -18

Decimal part missing

Definition at line 49 of file error.h.

Referenced by err2reason_phrase(), and str2q().

#define E_Q_EMPTY   -16

Empty q

Definition at line 47 of file error.h.

Referenced by err2reason_phrase(), and str2q().

#define E_Q_INV_CHAR   -15

Invalid character in q

Definition at line 46 of file error.h.

Referenced by err2reason_phrase(), and str2q().

#define E_Q_TOO_BIG   -17

q too big (> 1)

Definition at line 48 of file error.h.

Referenced by err2reason_phrase(), and str2q().

#define E_SCRIPT   -10

script programming error

Definition at line 41 of file error.h.

Referenced by acc_fixup(), fixup_get_profile2(), and t_newtran().

#define E_SEND   -477

generic send error

Definition at line 57 of file error.h.

Referenced by err2reason_phrase(), forward_request(), t_forward_nonack(), and t_relay_inerr2scripterr().

#define E_TOO_MANY_BRANCHES   -12

too many branches demanded

Definition at line 43 of file error.h.

Referenced by append_branch(), and err2reason_phrase().

#define E_UNSPEC   -1

Definition at line 32 of file error.h.

Referenced by ac_uac_req(), add_header_fixup(), check_user_blacklist_fixup(), do_action(), domain_fixup(), exec_avp_fixup(), fixup_bm_timer(), fixup_check_avp(), fixup_copy_avp(), fixup_cpl_run_script(), fixup_db_avp(), fixup_db_query_avp(), fixup_delete_avp(), fixup_fix_sdp(), fixup_free_igp_pvar_pvar(), fixup_free_pvar_null(), fixup_free_pvar_pvar(), fixup_free_pvar_str(), fixup_free_pvar_str_str(), fixup_free_regexp_none(), fixup_free_regexp_null(), fixup_free_str_null(), fixup_free_str_str(), fixup_igp(), fixup_igp_igp(), fixup_igp_null(), fixup_igp_pvar_pvar(), fixup_is_avp_set(), fixup_maxfwd_header(), fixup_method(), fixup_op_avp(), fixup_phostport2proxy(), fixup_presence(), fixup_privacy(), fixup_pua_xmpp(), fixup_pushto_avp(), fixup_pvar(), fixup_pvar_null(), fixup_pvar_pvar(), fixup_pvar_str(), fixup_pvar_str_str(), fixup_regexp_none(), fixup_regexp_null(), fixup_regexpNL_none(), fixup_regexpNL_null(), fixup_replace_from1(), fixup_replace_from2(), fixup_sl_send_reply(), fixup_sms_send_msg_to_net(), fixup_spve(), fixup_spve_null(), fixup_spve_spve(), fixup_spve_str(), fixup_spve_uint(), fixup_str(), fixup_str_null(), fixup_str_str(), fixup_subscribe(), fixup_subst(), fixup_uint_null(), fixup_uint_uint(), fixup_var_str_int(), get_gid_fixup(), get_redirect_fixup(), group_fixup(), h350_auth_lookup_fixup(), hf_fixup(), hname_fixup(), it_list_fixup(), ldap_filter_url_encode_fixup(), ldap_result_check_fixup(), ldap_result_fixup(), mod_init(), parse_avp_db(), run_action_list(), run_actions(), setf_fixup(), write_to_unixsock(), xdbg_fixup(), and xlog_fixup().

#define MAX_REASON_LEN   128

Definition at line 64 of file error.h.

Referenced by ac_uac_req(), as_action_fail_resp(), mi_tm_uac_dlg(), and sl_reply_error().


Function Documentation

int err2reason_phrase ( int  ser_error,
int *  sip_error,
char *  phrase,
int  etl,
char *  signature 
)

ser error -> SIP error

Parameters:
ser_error  current internal ser error
sip_error  the sip error code to which ser error will be turned
phrase  resulting error text
etl  error text buffer length
signature  extra text to be appended

Definition at line 49 of file error.c.

References E_BAD_ADDRESS, E_BAD_REQ, E_BAD_SERVER, E_BAD_TO, E_BAD_TUPEL, E_BAD_URI, E_EXEC, E_IP_BLOCKED, E_OUT_OF_MEM, E_Q_DEC_MISSING, E_Q_EMPTY, E_Q_INV_CHAR, E_Q_TOO_BIG, E_SEND, E_TOO_MANY_BRANCHES, and snprintf.

Referenced by ac_uac_req(), kill_transaction(), mi_tm_uac_dlg(), and sl_reply_error().

char* error_text ( int  code  ) 

SIP error core -> SIP text.

Definition at line 128 of file error.c.

Referenced by env_set_code_status(), get_reply_status(), and relay_reply().

void get_reply_status ( str status,
struct sip_msg reply,
int  code 
)

return pkg_malloc-ed reply status in status->s

Definition at line 213 of file error.c.

References error_text(), FAKED_REPLY, sip_msg::first_line, _str::len, LM_CRIT, LM_ERR, pkg_malloc, msg_start::reply, _str::s, and msg_start::u.

Referenced by mi_uac_dlg_hdl().


Variable Documentation

previous error

Definition at line 47 of file error.c.

Referenced by do_action(), and sl_reply_error().

int ser_error


Generated on Wed May 23 06:01:02 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6