Ticket #1909 (closed enhancement: fixed)

Opened 3 years ago

Last modified 2 years ago

GUID implementation for Android

Reported by: ming Owned by: bennylp
Priority: normal Milestone: release-2.5
Component: pjlib Version: trunk
Keywords: Cc:
Backport to 1.x milestone: Backported: no

Description

Currently, on Android, due to unavailability of native UUID support, we use guid_simple.c which relies on simple rand(). Unfortunately, this may cause ID collision, such as for Call-ID. The proper implementation is to use java.util.UUID API instead.

Thanks to Johan Lantz for the report and the patch.

Change History

comment:1 Changed 3 years ago by ming

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

In 5264:

Fixed #1909: GUID implementation for Android.

Thanks to Johan Lantz for the contribution.

comment:2 Changed 2 years ago by riza

In 5272:

Re #1909: Fixed crash related to r5264.

  • pj_generate_unique_string() expecting the user to specify the slen of the output string, this will lead to assert on pj_strncpy() if not set
  • modify PJ_GUID_STRING_LENGTH to 36
Note: See TracTickets for help on using tickets.