📄 inet_msg_sip.c
字号:
* src [?]
* RETURNS
* void
*****************************************************************************/
void *inet_session_expires_struct_copy_fn(inet_mem_func_struct *mem_func, void *src)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
inet_session_expires_struct *val, *in_data = (inet_session_expires_struct*) src;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
if (!in_data || !mem_func)
{
return in_data;
}
val = inet_malloc(mem_func, sizeof(inet_session_expires_struct));
CHECK_INET_PARAM(val, NULL);
val->expires = in_data->expires;
if (in_data->param_list)
{
val->param_list = inet_param_list_struct_copy_fn(mem_func, in_data->param_list);
if (!val->param_list)
{
goto exit_due_to_mem;
}
}
return (void*)val;
exit_due_to_mem:
inet_session_expires_struct_free_fn(mem_func, val);
return NULL;
}
/*****************************************************************************
* FUNCTION
* inet_event_struct_copy_fn
* DESCRIPTION
*
* PARAMETERS
* mem_func [?]
* src [?]
* RETURNS
* void
*****************************************************************************/
void *inet_event_struct_copy_fn(inet_mem_func_struct *mem_func, void *src)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
inet_event_struct *val, *in_data = (inet_event_struct*) src;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
if (!in_data || !mem_func)
{
return in_data;
}
val = inet_malloc(mem_func, sizeof(inet_event_struct));
CHECK_INET_PARAM(val, NULL);
val->event = (kal_char*) inet_msg_strdup(mem_func, in_data->event);
if (!val->event)
{
goto exit_due_to_mem;
}
if (in_data->param_list)
{
val->param_list = inet_param_list_struct_copy_fn(mem_func, in_data->param_list);
if (!val->param_list)
{
goto exit_due_to_mem;
}
}
return (void*)val;
exit_due_to_mem:
inet_event_struct_free_fn(mem_func, val);
return NULL;
}
/*****************************************************************************
* FUNCTION
* inet_subscription_state_struct_copy_fn
* DESCRIPTION
*
* PARAMETERS
* mem_func [?]
* src [?]
* RETURNS
* void
*****************************************************************************/
void *inet_subscription_state_struct_copy_fn(inet_mem_func_struct *mem_func, void *src)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
inet_subscription_state_struct *val;
inet_subscription_state_struct *in_data = (inet_subscription_state_struct*) src;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
if (!in_data || !mem_func)
{
return in_data;
}
val = inet_malloc(mem_func, sizeof(inet_subscription_state_struct));
CHECK_INET_PARAM(val, NULL);
val->state = (kal_char*) inet_msg_strdup(mem_func, in_data->state);
if (!val->state)
{
goto exit_due_to_mem;
}
if (in_data->param_list)
{
val->param_list = inet_param_list_struct_copy_fn(mem_func, in_data->param_list);
if (!val->param_list)
{
goto exit_due_to_mem;
}
}
return (void*)val;
exit_due_to_mem:
inet_subscription_state_struct_free_fn(mem_func, val);
return NULL;
}
/*****************************************************************************
* FUNCTION
* inet_answer_mode_struct_copy_fn
* DESCRIPTION
*
* PARAMETERS
* mem_func [?]
* src [?]
* RETURNS
* void
*****************************************************************************/
void *inet_answer_mode_struct_copy_fn(inet_mem_func_struct *mem_func, void *src)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
inet_answer_mode_struct *val;
inet_answer_mode_struct *in_data = (inet_answer_mode_struct*) src;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
if (!in_data || !mem_func)
{
return in_data;
}
val = inet_malloc(mem_func, sizeof(inet_answer_mode_struct));
CHECK_INET_PARAM(val, NULL);
val->answer_mode = (kal_char*) inet_msg_strdup(mem_func, in_data->answer_mode);
if (!val->answer_mode)
{
goto exit_due_to_mem;
}
if (in_data->param_list)
{
val->param_list = inet_param_list_struct_copy_fn(mem_func, in_data->param_list);
if (!val->param_list)
{
goto exit_due_to_mem;
}
}
return (void*)val;
exit_due_to_mem:
inet_answer_mode_struct_free_fn(mem_func, val);
return NULL;
}
/*****************************************************************************
* Free functions
*****************************************************************************/
/*****************************************************************************
* FUNCTION
* inet_session_expires_struct_free_fn
* DESCRIPTION
*
* PARAMETERS
* mem_func [?]
* data [?]
* RETURNS
* void
*****************************************************************************/
void inet_session_expires_struct_free_fn(inet_mem_func_struct *mem_func, void *data)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
if (data)
{
inet_session_expires_struct *obj = (inet_session_expires_struct*) data;
if (obj->param_list)
{
inet_param_list_struct_free_fn(mem_func, obj->param_list);
}
inet_mfree(mem_func, obj);
}
}
/*****************************************************************************
* FUNCTION
* inet_event_struct_free_fn
* DESCRIPTION
*
* PARAMETERS
* mem_func [?]
* data [?]
* RETURNS
* void
*****************************************************************************/
void inet_event_struct_free_fn(inet_mem_func_struct *mem_func, void *data)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
if (data)
{
inet_event_struct *obj = (inet_event_struct*) data;
if (obj->event)
{
inet_mfree(mem_func, obj->event);
}
if (obj->param_list)
{
inet_param_list_struct_free_fn(mem_func, obj->param_list);
}
inet_mfree(mem_func, obj);
}
}
/*****************************************************************************
* FUNCTION
* inet_subscription_state_struct_free_fn
* DESCRIPTION
*
* PARAMETERS
* mem_func [?]
* data [?]
* RETURNS
* void
*****************************************************************************/
void inet_subscription_state_struct_free_fn(inet_mem_func_struct *mem_func, void *data)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
if (data)
{
inet_subscription_state_struct *obj = (inet_subscription_state_struct*) data;
if (obj->state)
{
inet_mfree(mem_func, obj->state);
}
if (obj->param_list)
{
inet_param_list_struct_free_fn(mem_func, obj->param_list);
}
inet_mfree(mem_func, obj);
}
}
/*****************************************************************************
* FUNCTION
* inet_answer_mode_struct_free_fn
* DESCRIPTION
*
* PARAMETERS
* mem_func [?]
* data [?]
* RETURNS
* void
*****************************************************************************/
void inet_answer_mode_struct_free_fn(inet_mem_func_struct *mem_func, void *data)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
if (data)
{
inet_answer_mode_struct *obj = (inet_answer_mode_struct*) data;
if (obj->answer_mode)
{
inet_mfree(mem_func, obj->answer_mode);
}
if (obj->param_list)
{
inet_param_list_struct_free_fn(mem_func, obj->param_list);
}
inet_mfree(mem_func, obj);
}
}
#endif /* INET_MSG_LIB_SUPPORT */
#endif /* _INET_MSG_SIP_C */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -