Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#935 closed enhancement (fixed)

New PJLIB API pj_sockaddr_parse2() to parse "HOSTPART[:PORT]" format into the correspondong hostpart and port

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

Description (last modified by bennylp)

The pj_sockaddr_parse() was added in version 1.3 to parse "HOSTPART[:PORT]" into a pj_sockaddr structure, possibly resolving the hostpart into IP address.

The new API is pj_sockaddr_parse2(), which just returns the hostpart as string and optional port number. This is useful if caller does not want to resolve the hostpart into IP address (for example, if caller wants to resolve the hostpart with DNS SRV).

Change History (4)

comment:1 Changed 10 years ago by bennylp

  • Summary changed from New PJLIB API pj_inetaddr_parse() to parse "HOSTPART[:PORT]" format into the correspondong hostpart and port to New PJLIB API pj_sockaddr_parse2() to parse "HOSTPART[:PORT]" format into the correspondong hostpart and port

The pj_sockaddr_parse() was added in version 1.3 to parse "HOSTPART[:PORT]" into a pj_sockaddr structure, possibly resolving the hostpart into IP address.

The new API is pj_sockaddr_parse2(), which just returns the hostpart as string and optional port number. This is useful if caller does not want to resolve the hostpart into IP address (for example, if caller wants to resolve the hostpart with DNS SRV).

comment:2 Changed 10 years ago by bennylp

  • Description modified (diff)

comment:3 Changed 10 years ago by bennylp

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

Done in r2863

comment:4 Changed 10 years ago by bennylp

In r2886:

  • don't call pj_sockaddr_init() for PJ_AF_INET6 if IPv6 is not enabled
Note: See TracTickets for help on using tickets.