FS-3571 FS-3442 FS-957 --resolve tighten up the parsing of these boolean vals issue in t38 sdp

This commit is contained in:
Anthony Minessale
2011-09-19 20:11:23 -05:00
parent d820fe082b
commit 626b5cb2a2
4 changed files with 69 additions and 83 deletions

View File

@@ -868,6 +868,7 @@ typedef struct {
uint16_t remote_port;
const char *local_ip;
uint16_t local_port;
const char *sdp_o_line;
} switch_t38_options_t;
/*!

View File

@@ -525,6 +525,18 @@ static inline char *switch_clean_name_string(char *s)
/*!
\brief Turn a string into a number (default if NULL)
\param nptr the string
\param dft the default
\return the number version of the string or the default
*/
static inline int switch_safe_atoi(const char *nptr, int dft)
{
return nptr ? atoi(nptr) : dft;
}
/*!
\brief Free a pointer and set it to NULL unless it already is NULL
\param it the pointer