Ticket #367 (closed enhancement: fixed)
Hash table will duplicate the hash key (thanks Scott Lu)
|Reported by:||bennylp||Owned by:||bennylp|
|Backport to 1.x milestone:||Backported:|
Previously, the hash table will just keep the pointer of the key in pj_hash_set(). This is inconsistent with the pj_hash_set() API declaration, which says that the key is a const pointer, which normally should be copied by the function, and not kept for reference.
Although this works fine for PJSIP libraries, unsuspecting users may expect this function to behave differently, thus a better implementation is to duplicate the key to avoid confusion.