mirror of
https://dev.iopsys.eu/bbf/icwmp.git
synced 2026-03-01 17:42:02 +01:00
Ticket refs #10656 : icwmp not starting
This commit is contained in:
parent
39218e5240
commit
c26d6e5173
4 changed files with 23 additions and 2 deletions
9
config.c
9
config.c
|
|
@ -609,6 +609,15 @@ int get_global_config(struct config *conf)
|
|||
{
|
||||
FREE(conf->https_ssl_capath);
|
||||
}
|
||||
if((error = uci_get_value(HTTP_DISABLE_100CONTINUE,&value)) == CWMP_OK)
|
||||
{
|
||||
if(value != NULL)
|
||||
{
|
||||
if ((strcasecmp(value,"true")==0) || (strcmp(value,"1")==0))
|
||||
conf->http_disable_100continue = true;
|
||||
value = NULL;
|
||||
}
|
||||
}
|
||||
if((error = uci_get_value(UCI_ACS_INSECURE_ENABLE,&value)) == CWMP_OK)
|
||||
{
|
||||
if(value != NULL)
|
||||
|
|
|
|||
6
http.c
6
http.c
|
|
@ -186,6 +186,12 @@ http_send_message(struct cwmp *cwmp, char *msg_out, int msg_out_len,char **msg_i
|
|||
http_c.header_list = curl_slist_append(http_c.header_list, expect_header);
|
||||
if (!http_c.header_list) return -1;
|
||||
# endif /* ACS_FUSION */
|
||||
if (cwmp->conf.http_disable_100continue)
|
||||
{
|
||||
char *expect_header = "Expect:";
|
||||
http_c.header_list = curl_slist_append(http_c.header_list, expect_header);
|
||||
if (!http_c.header_list) return -1;
|
||||
}
|
||||
curl_easy_setopt(curl, CURLOPT_URL, http_c.url);
|
||||
curl_easy_setopt(curl, CURLOPT_USERNAME, cwmp->conf.acs_userid);
|
||||
curl_easy_setopt(curl, CURLOPT_PASSWORD, cwmp->conf.acs_passwd);
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@
|
|||
#define UCI_ACS_SSL_VERSION "cwmp.acs.ssl_version"
|
||||
#define UCI_ACS_COMPRESSION "cwmp.acs.compression"
|
||||
#define UCI_ACS_RETRY_MIN_WAIT_INTERVAL "cwmp.acs.retry_min_wait_interval"
|
||||
#define HTTP_DISABLE_100CONTINUE "cwmp.acs.http_disable_100continue"
|
||||
#define UCI_ACS_RETRY_INTERVAL_MULTIPLIER "cwmp.acs.retry_interval_multiplier"
|
||||
#define UCI_LOG_SEVERITY_PATH "cwmp.cpe.log_severity"
|
||||
#define UCI_CPE_USERID_PATH "cwmp.cpe.userid"
|
||||
|
|
@ -205,6 +206,7 @@ typedef struct config {
|
|||
bool xmpp_enable;
|
||||
int xmpp_connection_id;
|
||||
char *xmpp_allowed_jid;
|
||||
bool http_disable_100continue;
|
||||
} config;
|
||||
|
||||
typedef struct env {
|
||||
|
|
|
|||
|
|
@ -36,14 +36,18 @@ check_acs_url() {
|
|||
if [ \( "_$acs_dhcp_discovery" = "_enable" \) -o \( "_$url" = "_" \) ];then
|
||||
url=`uci -P /var/state -q get $dhcp_url_path`
|
||||
echo "ACS URL from dhcp: $url"
|
||||
uci -P /var/state -q set cwmp.acs.url=$url
|
||||
if [ "_$url" != "_" ];then
|
||||
uci -P /var/state -q set cwmp.acs.url=$url
|
||||
fi
|
||||
elif [ "_$url" != "_" ];then
|
||||
url=`uci -q get cwmp.acs.url`
|
||||
echo "ACS URL from configuration: $url"
|
||||
else
|
||||
url=$default_acs
|
||||
echo "Using default ACS URL: $url"
|
||||
uci -P /var/state -q set cwmp.acs.url=$url
|
||||
if [ "_$url" != "_" ];then
|
||||
uci -P /var/state -q set cwmp.acs.url=$url
|
||||
fi
|
||||
fi
|
||||
|
||||
check_url_format $url
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue