Ticket #367 (closed enhancement: fixed)

Opened 11 years ago

Last modified 11 years ago

Hash table will duplicate the hash key (thanks Scott Lu)

Reported by: bennylp Owned by: bennylp
Priority: normal Milestone: release-0.8.0
Component: pjlib Version: trunk
Keywords: Cc:
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.

Change History

comment:1 Changed 11 years ago by bennylp

  • Status changed from new to closed
  • Resolution set to fixed

Implemented in r1429

Note: See TracTickets for help on using tickets.