mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-19 02:31:53 +00:00
Rename sofia_glue_get_user_host to switch_split_user_domain
and move to switch_utils. To allow use by other modules.
This commit is contained in:
@@ -640,6 +640,16 @@ SWITCH_DECLARE(int) switch_inet_pton(int af, const char *src, void *dst);
|
||||
|
||||
SWITCH_DECLARE(int) switch_number_cmp(const char *exp, int val);
|
||||
|
||||
/*!
|
||||
\brief Split a user@domain string as user and domain
|
||||
\param in the input string
|
||||
\param user the string to put the user into
|
||||
\param domain the string to put the domain into
|
||||
\return 1 if successfull
|
||||
\note Extended formats protocol:user@domain:port (Example: sip:toto@example.org)
|
||||
*/
|
||||
int switch_split_user_domain(char *in, char **user, char **domain);
|
||||
|
||||
/* malloc or DIE macros */
|
||||
#ifdef NDEBUG
|
||||
#define switch_malloc(ptr, len) (void)( (!!(ptr = malloc(len))) || (fprintf(stderr,"ABORT! Malloc failure at: %s:%s", __FILE__, __LINE__),abort(), 0), ptr )
|
||||
|
||||
Reference in New Issue
Block a user