Browse Source

Kamailio compatibility: Privacy header field name parser

This patch extendes the tm module with support for the Privacy header
field which are now parsed by the core, this patch teaches tm how to
ignore them.
Jan Janak 16 years ago
parent
commit
f4e8001524
1 changed files with 6 additions and 0 deletions
  1. 6 0
      modules/tm/sip_msg.c

+ 6 - 0
modules/tm/sip_msg.c

@@ -490,6 +490,7 @@ struct sip_msg*  sip_msg_cloner( struct sip_msg *org_msg, int *sip_msg_len )
 		case HDR_PPI_T:
 		case HDR_PPI_T:
 		case HDR_PAI_T:
 		case HDR_PAI_T:
 		case HDR_PATH_T:
 		case HDR_PATH_T:
+		case HDR_PRIVACY_T:
 			/* we ignore them for now even if they have something parsed*/
 			/* we ignore them for now even if they have something parsed*/
 			break;
 			break;
 		}/*switch*/
 		}/*switch*/
@@ -893,6 +894,11 @@ struct sip_msg*  sip_msg_cloner( struct sip_msg *org_msg, int *sip_msg_len )
 				new_msg->path = new_hdr;
 				new_msg->path = new_hdr;
 			}
 			}
 			break;
 			break;
+		case HDR_PRIVACY_T:
+			if (!HOOK_SET(privacy)) {
+				new_msg->privacy = new_hdr;
+			}
+			break;
 		}/*switch*/
 		}/*switch*/
 
 
 		if ( last_hdr )
 		if ( last_hdr )