Changeset 623 for pjproject/trunk
- Timestamp:
- Jul 23, 2006 10:10:35 AM (18 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib/src/pj/hash.c
r583 r623 205 205 { 206 206 pj_hash_entry *entry; 207 208 if (hval) *hval = 0;209 207 entry = *find_entry( NULL, ht, key, keylen, NULL, hval, NULL); 210 208 return entry ? entry->value : NULL; -
pjproject/trunk/pjsip-apps/build/pjsip_apps.dsw
r581 r623 208 208 ############################################################################### 209 209 210 Project: "test_pjsip"="..\..\pjsip\build\test_pjsip.dsp" - Package Owner=<4> 211 212 Package=<5> 213 {{{ 214 }}} 215 216 Package=<4> 217 {{{ 218 Begin Project Dependency 219 Project_Dep_Name pjlib 220 End Project Dependency 221 Begin Project Dependency 222 Project_Dep_Name pjlib_util 223 End Project Dependency 224 Begin Project Dependency 225 Project_Dep_Name pjmedia 226 End Project Dependency 227 Begin Project Dependency 228 Project_Dep_Name pjsip_core 229 End Project Dependency 230 Begin Project Dependency 231 Project_Dep_Name pjsip_simple 232 End Project Dependency 233 Begin Project Dependency 234 Project_Dep_Name pjsip_ua 235 End Project Dependency 236 }}} 237 238 ############################################################################### 239 210 240 Global: 211 241 -
pjproject/trunk/pjsip/src/pjsip/sip_transaction.c
r610 r623 38 38 #define TSX_TRACE_(expr) 39 39 #endif 40 41 /* When this macro is set, transaction will keep the hashed value 42 * so that future lookup (to unregister transaction) does not need 43 * to recalculate the hash again. It should gains a little bit of 44 * performance, so generally we'd want this. 45 */ 46 #define PRECALC_HASH 40 47 41 48 … … 530 537 531 538 /* Register the transaction to the hash table. */ 532 //pj_hash_set( tsx->pool, mod_tsx_layer.htable, tsx->transaction_key.ptr, 533 // tsx->transaction_key.slen, tsx->hashed_key, tsx); 534 PJ_TODO(USE_PRECALCULATED_HASHED_VALUE); 539 #ifdef PRECALC_HASH 540 pj_hash_set( tsx->pool, mod_tsx_layer.htable, tsx->transaction_key.ptr, 541 tsx->transaction_key.slen, tsx->hashed_key, tsx); 542 #else 535 543 pj_hash_set( tsx->pool, mod_tsx_layer.htable, tsx->transaction_key.ptr, 536 544 tsx->transaction_key.slen, 0, tsx); 545 #endif 537 546 538 547 /* Unlock mutex. */ … … 555 564 556 565 /* Register the transaction to the hash table. */ 557 //pj_hash_set( NULL, mod_tsx_layer.htable, tsx->transaction_key.ptr, 558 // tsx->transaction_key.slen, tsx->hashed_key, NULL); 559 PJ_TODO(USE_PRECALCULATED_HASHED_VALUE); 566 #ifdef PRECALC_HASH 560 567 pj_hash_set( NULL, mod_tsx_layer.htable, tsx->transaction_key.ptr, 561 tsx->transaction_key.slen, 0, NULL); 568 tsx->transaction_key.slen, tsx->hashed_key, NULL); 569 #else 570 pj_hash_set( NULL, mod_tsx_layer.htable, tsx->transaction_key.ptr, 571 tsx->transaction_key.slen, 0, NULL); 572 #endif 562 573 563 574 TSX_TRACE_((THIS_FILE, … … 1154 1165 1155 1166 /* Calculate hashed key value. */ 1156 PJ_TODO(OPTIMIZE_TSX_BY_PRECALCULATING_HASHED_KEY_VALUE); 1157 /* 1158 blp: somehow this yields different hashed value!! 1159 1167 #ifdef PRECALC_HASH 1160 1168 tsx->hashed_key = pj_hash_calc(0, tsx->transaction_key.ptr, 1161 1169 tsx->transaction_key.slen); 1162 */ 1170 #endif 1163 1171 1164 1172 PJ_LOG(6, (tsx->obj_name, "tsx_key=%.*s", tsx->transaction_key.slen, … … 1283 1291 1284 1292 /* Calculate hashed key value. */ 1285 PJ_TODO(OPTIMIZE_TSX_BY_PRECALCULATING_HASHED_KEY_VALUE); 1286 /* 1287 blp: somehow this yields different hashed value!! 1288 1293 #ifdef PRECALC_HASH 1289 1294 tsx->hashed_key = pj_hash_calc(0, tsx->transaction_key.ptr, 1290 1295 tsx->transaction_key.slen); 1291 */ 1296 #endif 1292 1297 1293 1298 /* Duplicate branch parameter for transaction. */
Note: See TracChangeset
for help on using the changeset viewer.