Update XMPP & BulkData & UDPEcho to the latest version of bbf

This commit is contained in:
Amin Ben Ramdhane 2020-10-01 22:57:00 +01:00
parent c514903145
commit f358d6338d
3 changed files with 6 additions and 6 deletions

View file

@ -118,7 +118,7 @@ static int addObjBulkDataProfile(char *refparam, struct dmctx *ctx, void *data,
last_inst = get_last_instance_bbfdm("dmmap_bulkdata", "profile", "profile_instance"); last_inst = get_last_instance_bbfdm("dmmap_bulkdata", "profile", "profile_instance");
snprintf(prof_id, sizeof(prof_id), "%d", last_inst ? atoi(last_inst)+1 : 1); snprintf(prof_id, sizeof(prof_id), "%d", last_inst ? atoi(last_inst)+1 : 1);
dmuci_add_section_and_rename("bulkdata", "profile", &profile, &value); dmuci_add_section("bulkdata", "profile", &profile, &value);
dmuci_set_value_by_section(profile, "profile_id", prof_id); dmuci_set_value_by_section(profile, "profile_id", prof_id);
dmuci_set_value_by_section(profile, "enable", "0"); dmuci_set_value_by_section(profile, "enable", "0");
dmuci_set_value_by_section(profile, "nbre_of_retained_failed_reports", "0"); dmuci_set_value_by_section(profile, "nbre_of_retained_failed_reports", "0");
@ -228,7 +228,7 @@ static int addObjBulkDataProfileParameter(char *refparam, struct dmctx *ctx, voi
last_inst = get_last_instance_lev2_bbfdm_dmmap_opt("dmmap_bulkdata", "profile_parameter", "parameter_instance", "profile_id", prev_profile_id); last_inst = get_last_instance_lev2_bbfdm_dmmap_opt("dmmap_bulkdata", "profile_parameter", "parameter_instance", "profile_id", prev_profile_id);
dmuci_add_section_and_rename("bulkdata", "profile_parameter", &profile_parameter, &value); dmuci_add_section("bulkdata", "profile_parameter", &profile_parameter, &value);
dmuci_set_value_by_section(profile_parameter, "profile_id", prev_profile_id); dmuci_set_value_by_section(profile_parameter, "profile_id", prev_profile_id);
browse_args.option = "profile_id"; browse_args.option = "profile_id";
@ -282,7 +282,7 @@ static int addObjBulkDataProfileHTTPRequestURIParameter(char *refparam, struct d
last_inst = get_last_instance_lev2_bbfdm_dmmap_opt("dmmap_bulkdata", "profile_http_request_uri_parameter", "requesturiparameter_instance", "profile_id", prev_profile_id); last_inst = get_last_instance_lev2_bbfdm_dmmap_opt("dmmap_bulkdata", "profile_http_request_uri_parameter", "requesturiparameter_instance", "profile_id", prev_profile_id);
dmuci_add_section_and_rename("bulkdata", "profile_http_request_uri_parameter", &profile_http_request_uri_parameter, &value); dmuci_add_section("bulkdata", "profile_http_request_uri_parameter", &profile_http_request_uri_parameter, &value);
dmuci_set_value_by_section(profile_http_request_uri_parameter, "profile_id", prev_profile_id); dmuci_set_value_by_section(profile_http_request_uri_parameter, "profile_id", prev_profile_id);
browse_args.option = "profile_id"; browse_args.option = "profile_id";

View file

@ -144,7 +144,7 @@ static int get_IPDiagnosticsUDPEchoConfig_EchoPlusSupported(char *refparam, stru
static inline char *udpechoconfig_get(char *option, char *def) static inline char *udpechoconfig_get(char *option, char *def)
{ {
char *tmp; char *tmp;
dmuci_get_varstate_string("udpechoserver", "udpechoserver", option, &tmp); varstate_get_value_string("udpechoserver", "udpechoserver", option, &tmp);
if(tmp && tmp[0] == '\0') if(tmp && tmp[0] == '\0')
return dmstrdup(def); return dmstrdup(def);
else else

View file

@ -32,14 +32,14 @@ static int add_xmpp_connection(char *refparam, struct dmctx *ctx, void *data, ch
last_inst = get_last_instance_bbfdm("dmmap_xmpp", "connection", "con_inst"); last_inst = get_last_instance_bbfdm("dmmap_xmpp", "connection", "con_inst");
dmasprintf(&id, "%d", (last_inst) ? atoi(last_inst) + 1 : 1); dmasprintf(&id, "%d", (last_inst) ? atoi(last_inst) + 1 : 1);
dmuci_add_section_and_rename("xmpp", "connection", &xmpp_con, &con_name); dmuci_add_section("xmpp", "connection", &xmpp_con, &con_name);
dmuci_set_value_by_section(xmpp_con, "xmpp_id", id); dmuci_set_value_by_section(xmpp_con, "xmpp_id", id);
dmuci_set_value_by_section(xmpp_con, "enable", "0"); dmuci_set_value_by_section(xmpp_con, "enable", "0");
dmuci_set_value_by_section(xmpp_con, "interval", "30"); dmuci_set_value_by_section(xmpp_con, "interval", "30");
dmuci_set_value_by_section(xmpp_con, "attempt", "16"); dmuci_set_value_by_section(xmpp_con, "attempt", "16");
dmuci_set_value_by_section(xmpp_con, "serveralgorithm", "DNS-SRV"); dmuci_set_value_by_section(xmpp_con, "serveralgorithm", "DNS-SRV");
dmuci_add_section_and_rename("xmpp", "connection_server", &xmpp_con_srv, &con_srv_name); dmuci_add_section("xmpp", "connection_server", &xmpp_con_srv, &con_srv_name);
dmuci_set_value_by_section(xmpp_con_srv, "con_id", id); dmuci_set_value_by_section(xmpp_con_srv, "con_id", id);
dmuci_set_value_by_section(xmpp_con_srv, "enable", "0"); dmuci_set_value_by_section(xmpp_con_srv, "enable", "0");
dmuci_set_value_by_section(xmpp_con_srv, "port", "5222"); dmuci_set_value_by_section(xmpp_con_srv, "port", "5222");