Author: sayer
Date: 2009-02-01 13:53:47 +0100 (Sun, 01 Feb 2009)
New Revision: 1254

Modified:
   trunk/apps/auth_b2b/AuthB2B.cpp
Log:
simplify by using helper function

Modified: trunk/apps/auth_b2b/AuthB2B.cpp
===================================================================
--- trunk/apps/auth_b2b/AuthB2B.cpp     2009-02-01 12:51:36 UTC (rev 1253)
+++ trunk/apps/auth_b2b/AuthB2B.cpp     2009-02-01 12:53:47 UTC (rev 1254)
@@ -143,25 +143,10 @@
   }
 
   invite_req = req;
-  size_t pos1, pos2, hdr_start;
 
-  if (findHeader(invite_req.hdrs,PARAM_HDR, pos1, pos2, 
-                hdr_start)) {
-    while (invite_req.hdrs[pos2]=='\r' ||invite_req.hdrs[pos2]=='\n') 
-      pos2++;
+  removeHeader(invite_req.hdrs,PARAM_HDR);
+  removeHeader(invite_req.hdrs,"P-App-Name");
 
-    hdr_start -= 11; //"P-App-Param"
-    invite_req.hdrs.erase(hdr_start, pos2-hdr_start);
-  }
-
-  if (findHeader(invite_req.hdrs,"P-App-Name", pos1, pos2, 
-                hdr_start)) {
-    while (invite_req.hdrs[pos2]=='\r' ||invite_req.hdrs[pos2]=='\n') 
-      pos2++;
-    hdr_start -= 10; //"P-App-Name"
-    invite_req.hdrs.erase(hdr_start, pos2-hdr_start);
-  }
-
   dlg.updateStatus(req);
   recvd_req.insert(std::make_pair(req.cseq,req));
   

_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to