summaryrefslogtreecommitdiff
path: root/pjsip/include
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2006-07-03 22:08:47 +0000
committerBenny Prijono <bennylp@teluu.com>2006-07-03 22:08:47 +0000
commit31d42235239a1291a599b84cc352b7b5b53448b7 (patch)
tree5770b56b29cbd313e47e5067fa3ee4a3b4895240 /pjsip/include
parented98898bb501d02e69093d34961bf1fb46d2ed4d (diff)
Various performance improvements in PJSIP: (1) optimizing for common case to minimize stricmp() calls (header names, method, URI schemes), (2) added functionality in scanner to parse and unescape in-place, (3) etc..
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@583 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/include')
-rw-r--r--pjsip/include/pjsip/sip_config.h17
-rw-r--r--pjsip/include/pjsip/sip_parser.h4
2 files changed, 21 insertions, 0 deletions
diff --git a/pjsip/include/pjsip/sip_config.h b/pjsip/include/pjsip/sip_config.h
index 535f6697..2d635d62 100644
--- a/pjsip/include/pjsip/sip_config.h
+++ b/pjsip/include/pjsip/sip_config.h
@@ -130,6 +130,23 @@
#endif
+/**
+ * If non-zero, SIP parser will unescape the escape characters ('%')
+ * in the original message, which means that it will modify the
+ * original message. Otherwise the parser will create a copy of
+ * the string and store the unescaped string to the new location.
+ *
+ * Unescaping in-place is faster, but less elegant (and it may
+ * break certain applications). So normally it's disabled, unless
+ * when benchmarking (to show off big performance).
+ *
+ * Default: 0
+ */
+#ifndef PJSIP_UNESCAPE_IN_PLACE
+# define PJSIP_UNESCAPE_IN_PLACE 0
+#endif
+
+
/* Endpoint. */
#define PJSIP_MAX_TIMER_COUNT (2*PJSIP_MAX_TSX_COUNT + 2*PJSIP_MAX_DIALOG_COUNT)
diff --git a/pjsip/include/pjsip/sip_parser.h b/pjsip/include/pjsip/sip_parser.h
index b9e752f0..54dd52df 100644
--- a/pjsip/include/pjsip/sip_parser.h
+++ b/pjsip/include/pjsip/sip_parser.h
@@ -315,10 +315,14 @@ extern pj_cis_t
pjsip_HEX_SPEC, /**< Hexadecimal digits. */
pjsip_PARAM_CHAR_SPEC, /**< For scanning pname (or pvalue when it's
not quoted.) */
+ pjsip_PARAM_CHAR_SPEC_ESC, /**< Variant without the escape ('%') char */
pjsip_HDR_CHAR_SPEC, /**< Chars in hname/havalue in URL. */
+ pjsip_HDR_CHAR_SPEC_ESC, /**< Variant without the escape ('%') char */
pjsip_PROBE_USER_HOST_SPEC, /**< Hostname characters. */
pjsip_PASSWD_SPEC, /**< Password. */
+ pjsip_PASSWD_SPEC_ESC, /**< Variant without the escape ('%') char */
pjsip_USER_SPEC, /**< User */
+ pjsip_USER_SPEC_ESC, /**< Variant without the escape ('%') char */
pjsip_NOT_NEWLINE, /**< For eating up header, basicly any chars
except newlines or zero. */
pjsip_NOT_COMMA_OR_NEWLINE, /**< Array elements. */