#include "../../qvalue.h"
#include "../../parser/msg_parser.h"
#include "../../parser/contact/parse_contact.h"


Go to the source code of this file.
Functions | |
| void | calc_contact_expires (struct sip_msg *_m, param_t *_ep, int *_e) |
| Calculate absolute expires value per contact as follows: 1) If the contact has expires value, use the value. If it is not zero, add actual time to it 2) If the contact has no expires parameter, use expires header field in the same way 3) If the message contained no expires header field, use the default value. | |
| int | calc_contact_q (param_t *_q, qvalue_t *_r) |
| Calculate contact q value as follows: 1) If q parameter exist, use it 2) If the parameter doesn't exist, use default value. | |
| int | check_contacts (struct sip_msg *_m, int *_s) |
| Check if the originating REGISTER message was formed correctly The whole message must be parsed before calling the function _s indicates whether the contact was star. | |
| contact_t * | get_first_contact (struct sip_msg *_m) |
| Get the first contact in message. | |
| contact_t * | get_next_contact (contact_t *_c) |
| Get next contact in message. | |
| int | parse_message (struct sip_msg *_m) |
| Parse the whole message and bodies of all header fields that will be needed by registrar. | |
Definition in file registrar/sip_msg.h.
Calculate absolute expires value per contact as follows: 1) If the contact has expires value, use the value. If it is not zero, add actual time to it 2) If the contact has no expires parameter, use expires header field in the same way 3) If the message contained no expires header field, use the default value.
Definition at line 234 of file registrar/sip_msg.c.
References act_time, param::body, default_expires, get_expires_hf(), _str::len, max_expires, min_expires, and str2int().
Referenced by insert_contacts(), test_max_contacts(), and update_contacts().
| int check_contacts | ( | struct sip_msg * | _m, | |
| int * | _s | |||
| ) |
Check if the originating REGISTER message was formed correctly The whole message must be parsed before calling the function _s indicates whether the contact was star.
Definition at line 131 of file registrar/sip_msg.c.
References sip_msg::contact, CONTACT_MAX_SIZE, get_expires_hf(), HDR_CONTACT_T, param::len, _str::len, contact::next, hdr_field::next, hdr_field::parsed, R_CONTACT_LEN, R_STAR_CONT, R_STAR_EXP, contact::received, RECEIVED_MAX_SIZE, rerrno, hdr_field::type, and contact::uri.
Referenced by save().
Get the first contact in message.
Definition at line 194 of file registrar/sip_msg.c.
References sip_msg::contact, and hdr_field::parsed.
Referenced by save().
Get next contact in message.
Definition at line 206 of file registrar/sip_msg.c.
References HDR_CONTACT_T, hdr_field::next, contact::next, hdr_field::parsed, and hdr_field::type.
Referenced by insert_contacts(), test_max_contacts(), and update_contacts().
| int parse_message | ( | struct sip_msg * | _m | ) |
Parse the whole message and bodies of all header fields that will be needed by registrar.
Definition at line 74 of file registrar/sip_msg.c.
References sip_msg::callid, sip_msg::contact, sip_msg::cseq, sip_msg::expires, HDR_CONTACT_T, HDR_EOH_F, LM_ERR, hdr_field::next, parse_contact(), parse_expires(), parse_headers(), hdr_field::parsed, R_CID_MISS, R_CS_MISS, R_PARSE, R_PARSE_CONT, R_PARSE_EXP, R_TO_MISS, rerrno, sip_msg::to, and hdr_field::type.
Referenced by save().
1.5.6