mirror of
https://dev.iopsys.eu/bbf/icwmp.git
synced 2026-03-13 12:32:20 +01:00
Ticket refs #2673: TR069: No '4 value change' sent in case of active passive notification
This commit is contained in:
parent
e848013dde
commit
df633285d5
4 changed files with 27 additions and 26 deletions
2
config.c
2
config.c
|
|
@ -1229,7 +1229,7 @@ int cwmp_init(int argc, char** argv,struct cwmp *cwmp)
|
|||
return error;
|
||||
}
|
||||
cwmp_get_deviceid(cwmp);
|
||||
dm_entry_load_enabled_notify(DM_CWMP, cwmp->conf.amd_version, cwmp->conf.instance_mode);
|
||||
dm_entry_load_enabled_notify(DM_CWMP, cwmp->conf.amd_version, cwmp->conf.instance_mode, add_list_value_change, send_active_value_change);
|
||||
return CWMP_OK;
|
||||
}
|
||||
|
||||
|
|
|
|||
24
cwmp.c
24
cwmp.c
|
|
@ -644,6 +644,30 @@ int run_session_end_func (struct session *session)
|
|||
return CWMP_OK;
|
||||
}
|
||||
|
||||
void add_list_value_change(char *param_name, char *param_data, char *param_type)
|
||||
{
|
||||
pthread_mutex_lock(&(mutex_value_change));
|
||||
add_dm_parameter_tolist(&list_value_change, param_name, param_data, param_type);
|
||||
pthread_mutex_unlock(&(mutex_value_change));
|
||||
}
|
||||
|
||||
void send_active_value_change(void)
|
||||
{
|
||||
struct cwmp *cwmp = &cwmp_main;
|
||||
struct event_container *event_container;
|
||||
pthread_mutex_lock(&(cwmp->mutex_session_queue));
|
||||
event_container = cwmp_add_event_container(cwmp, EVENT_IDX_4VALUE_CHANGE, "");
|
||||
if (event_container == NULL)
|
||||
{
|
||||
pthread_mutex_unlock(&(cwmp->mutex_session_queue));
|
||||
return;
|
||||
}
|
||||
cwmp_save_event_container(cwmp,event_container);
|
||||
pthread_mutex_unlock(&(cwmp->mutex_session_queue));
|
||||
pthread_cond_signal(&(cwmp->threshold_session_send));
|
||||
return;
|
||||
}
|
||||
|
||||
int cwmp_apply_acs_changes ()
|
||||
{
|
||||
int error;
|
||||
|
|
|
|||
25
event.c
25
event.c
|
|
@ -174,13 +174,6 @@ void free_dm_parameter_all_fromlist(struct list_head *list)
|
|||
}
|
||||
}
|
||||
|
||||
void add_list_value_change(char *param_name, char *param_data, char *param_type)
|
||||
{
|
||||
pthread_mutex_lock(&(mutex_value_change));
|
||||
add_dm_parameter_tolist(&list_value_change, param_name, param_data, param_type);
|
||||
pthread_mutex_unlock(&(mutex_value_change));
|
||||
}
|
||||
|
||||
void add_lw_list_value_change(char *param_name, char *param_data, char *param_type)
|
||||
{
|
||||
add_dm_parameter_tolist(&list_lw_value_change, param_name, param_data, param_type);
|
||||
|
|
@ -286,24 +279,6 @@ void cwmp_lwnotification()
|
|||
FREE(msg_out);
|
||||
}
|
||||
|
||||
void send_active_value_change(void)
|
||||
{
|
||||
struct cwmp *cwmp = &cwmp_main;
|
||||
struct event_container *event_container;
|
||||
|
||||
pthread_mutex_lock(&(cwmp->mutex_session_queue));
|
||||
event_container = cwmp_add_event_container(cwmp, EVENT_IDX_4VALUE_CHANGE, "");
|
||||
if (event_container == NULL)
|
||||
{
|
||||
pthread_mutex_unlock(&(cwmp->mutex_session_queue));
|
||||
return;
|
||||
}
|
||||
cwmp_save_event_container(cwmp,event_container);
|
||||
pthread_mutex_unlock(&(cwmp->mutex_session_queue));
|
||||
pthread_cond_signal(&(cwmp->threshold_session_send));
|
||||
return;
|
||||
}
|
||||
|
||||
void cwmp_add_notification(void)
|
||||
{
|
||||
int fault, iscopy;
|
||||
|
|
|
|||
|
|
@ -319,4 +319,6 @@ int cwmp_move_session_to_session_queue (struct cwmp *cwmp, struct session *sessi
|
|||
int cwmp_session_destructor (struct cwmp *cwmp, struct session *session);
|
||||
int cwmp_init(int argc, char** argv,struct cwmp *cwmp);
|
||||
int cwmp_exit(void);
|
||||
void add_list_value_change(char *param_name, char *param_data, char *param_type);
|
||||
void send_active_value_change(void);
|
||||
#endif /* _CWMP_H__ */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue