Copyright (C) 2007 PT Inovacao
Definition in file privacy.h.
Go to the source code of this file.
Functions | |
| int | S_privacy_hook (struct sip_msg *msg, char *str1, char *str2) |
| Registers tm callback to apply privacy to replies. | |
| int | S_apply_privacy (struct sip_msg *msg, char *str1, char *str2) |
| Applies Privacy if needed. | |
| int S_privacy_hook | ( | struct sip_msg * | msg, | |
| char * | str1, | |||
| char * | str2 | |||
| ) |
Registers tm callback to apply privacy to replies.
| msg | - the SIP message | |
| str1 | - not used | |
| str2 | - not used |
Definition at line 133 of file privacy.c.
References cscf_get_transaction(), CSCF_RETURN_TRUE, privacy_reply_cb(), and tmb.
00133 { 00134 unsigned int a,b; 00135 00136 cscf_get_transaction(msg,&a,&b); 00137 tmb.register_tmcb(msg,0,TMCB_RESPONSE_IN,privacy_reply_cb,0); 00138 00139 return CSCF_RETURN_TRUE; 00140 }
| int S_apply_privacy | ( | struct sip_msg * | msg, | |
| char * | str1, | |||
| char * | str2 | |||
| ) |
Applies Privacy if needed.
| msg | - the SIP message | |
| str1 | - not used | |
| str2 | - not used |
Definition at line 100 of file privacy.c.
References apply_privacy_id(), cscf_get_headers_content(), CSCF_RETURN_FALSE, M_NAME, and privacy.
Referenced by privacy_reply_cb().
00100 { 00101 char *c; 00102 int ret = CSCF_RETURN_FALSE; 00103 00104 str privacy_content = cscf_get_headers_content(msg,privacy); 00105 00106 if (!privacy_content.len){ 00107 ret = CSCF_RETURN_FALSE; 00108 goto done; 00109 } 00110 00111 LOG(L_DBG, "DBG:"M_NAME":S_apply_privacy\n"); 00112 c = strtok(privacy_content.s," \t\r\n;,"); 00113 while (c){ 00114 if (strlen(c)==2 && strncasecmp(c,"id",2)==0){ 00115 ret = apply_privacy_id(msg); 00116 break; 00117 } 00118 c = strtok(0," \t\r\n;,"); 00119 } 00120 00121 done: 00122 if (privacy_content.s) pkg_free(privacy_content.s); 00123 return ret; 00124 }
1.5.2