|
@@ -382,18 +382,18 @@ extern int via_cnt;
|
|
extern unsigned int global_req_flags;
|
|
extern unsigned int global_req_flags;
|
|
|
|
|
|
|
|
|
|
-int parse_msg(char* buf, unsigned int len, struct sip_msg* msg);
|
|
|
|
|
|
+int parse_msg(char* const buf, const unsigned int len, struct sip_msg* const msg);
|
|
|
|
|
|
-int parse_headers(struct sip_msg* msg, hdr_flags_t flags, int next);
|
|
|
|
|
|
+int parse_headers(struct sip_msg* const msg, const hdr_flags_t flags, const int next);
|
|
|
|
|
|
char* get_hdr_field(char* const buf, char* const end, struct hdr_field* const hdr);
|
|
char* get_hdr_field(char* const buf, char* const end, struct hdr_field* const hdr);
|
|
|
|
|
|
-void free_sip_msg(struct sip_msg* msg);
|
|
|
|
|
|
+void free_sip_msg(struct sip_msg* const msg);
|
|
|
|
|
|
/*! \brief make sure all HFs needed for transaction identification have been
|
|
/*! \brief make sure all HFs needed for transaction identification have been
|
|
parsed; return 0 if those HFs can't be found
|
|
parsed; return 0 if those HFs can't be found
|
|
*/
|
|
*/
|
|
-inline static int check_transaction_quadruple( struct sip_msg* msg )
|
|
|
|
|
|
+inline static int check_transaction_quadruple(struct sip_msg* const msg)
|
|
{
|
|
{
|
|
if ( parse_headers(msg, HDR_FROM_F|HDR_TO_F|HDR_CALLID_F|HDR_CSEQ_F,0)!=-1
|
|
if ( parse_headers(msg, HDR_FROM_F|HDR_TO_F|HDR_CALLID_F|HDR_CSEQ_F,0)!=-1
|
|
&& msg->from && msg->to && msg->callid && msg->cseq ) {
|
|
&& msg->from && msg->to && msg->callid && msg->cseq ) {
|
|
@@ -408,7 +408,7 @@ inline static int check_transaction_quadruple( struct sip_msg* msg )
|
|
|
|
|
|
/*! \brief returns a pointer to the begining of the msg's body
|
|
/*! \brief returns a pointer to the begining of the msg's body
|
|
*/
|
|
*/
|
|
-inline static char* get_body(struct sip_msg *msg)
|
|
|
|
|
|
+inline static char* get_body(struct sip_msg* const msg)
|
|
{
|
|
{
|
|
int offset;
|
|
int offset;
|
|
unsigned int len;
|
|
unsigned int len;
|
|
@@ -434,10 +434,10 @@ inline static char* get_body(struct sip_msg *msg)
|
|
/*! \brief
|
|
/*! \brief
|
|
* Make a private copy of the string and assign it to dst_uri
|
|
* Make a private copy of the string and assign it to dst_uri
|
|
*/
|
|
*/
|
|
-int set_dst_uri(struct sip_msg* msg, str* uri);
|
|
|
|
|
|
+int set_dst_uri(struct sip_msg* const msg, const str* const uri);
|
|
|
|
|
|
/*! \brief If the dst_uri is set to an URI then reset it */
|
|
/*! \brief If the dst_uri is set to an URI then reset it */
|
|
-void reset_dst_uri(struct sip_msg* msg);
|
|
|
|
|
|
+void reset_dst_uri(struct sip_msg* const msg);
|
|
|
|
|
|
hdr_field_t* get_hdr(sip_msg_t *msg, enum _hdr_types_t ht);
|
|
hdr_field_t* get_hdr(sip_msg_t *msg, enum _hdr_types_t ht);
|
|
hdr_field_t* next_sibling_hdr(hdr_field_t *hf);
|
|
hdr_field_t* next_sibling_hdr(hdr_field_t *hf);
|
|
@@ -479,17 +479,17 @@ typedef struct msg_ctx_id {
|
|
* set msg context id
|
|
* set msg context id
|
|
* - return: -1 on error; 0 - on set
|
|
* - return: -1 on error; 0 - on set
|
|
*/
|
|
*/
|
|
-int msg_ctx_id_set(sip_msg_t *msg, msg_ctx_id_t *mid);
|
|
|
|
|
|
+int msg_ctx_id_set(const sip_msg_t* const msg, msg_ctx_id_t* const mid);
|
|
|
|
|
|
/**
|
|
/**
|
|
* check msg context id
|
|
* check msg context id
|
|
* - return: -1 on error; 0 - on no match; 1 - on match
|
|
* - return: -1 on error; 0 - on no match; 1 - on match
|
|
*/
|
|
*/
|
|
-int msg_ctx_id_match(sip_msg_t *msg, msg_ctx_id_t *mid);
|
|
|
|
|
|
+int msg_ctx_id_match(const sip_msg_t* const msg, const msg_ctx_id_t* const mid);
|
|
|
|
|
|
/**
|
|
/**
|
|
* set msg time value
|
|
* set msg time value
|
|
*/
|
|
*/
|
|
-int msg_set_time(sip_msg_t *msg);
|
|
|
|
|
|
+int msg_set_time(sip_msg_t* const msg);
|
|
|
|
|
|
#endif
|
|
#endif
|