mirror of
https://dev.iopsys.eu/bbf/icwmp.git
synced 2026-02-19 18:51:27 +01:00
fix download issue
This commit is contained in:
parent
003a7aa2ce
commit
b3db549d24
3 changed files with 11 additions and 5 deletions
|
|
@ -228,6 +228,9 @@ void external_init()
|
|||
close(pfds_in[1]);
|
||||
close(pfds_out[0]);
|
||||
|
||||
if (signal(SIGPIPE, SIG_IGN) == SIG_ERR)
|
||||
DD(ERROR, "freecwmp script intialization: signal ignoring error");
|
||||
|
||||
external_read_pipe_input(NULL);
|
||||
|
||||
DD(INFO, "freecwmp script is listening");
|
||||
|
|
@ -254,11 +257,11 @@ void external_exit()
|
|||
|
||||
while (wait(&status) != pid) {
|
||||
DD(DEBUG, "waiting for child to exit");
|
||||
}
|
||||
}
|
||||
|
||||
close(pfds_in[0]);
|
||||
close(pfds_out[1]);
|
||||
}
|
||||
}
|
||||
|
||||
int external_handle_action(int (*external_handler)(char *msg))
|
||||
{
|
||||
|
|
@ -292,7 +295,7 @@ int external_get_action(char *action, char *name, char *next_level)
|
|||
json_object_put(json_obj_out);
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
int external_set_action(char *action, char *name, char *value, char *change)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -328,7 +328,7 @@ handle_action() {
|
|||
if [ "$?" != "0" ];then
|
||||
let fault_code=$fault_code+$FAULT_CPE_DOWNLOAD_FAILURE
|
||||
freecwmp_fault_output "" "$fault_code"
|
||||
exit 1
|
||||
return 1
|
||||
fi
|
||||
else
|
||||
local url="http://$__arg4:$__arg5@`echo $__arg1|sed 's/http:\/\///g'`"
|
||||
|
|
@ -336,7 +336,7 @@ handle_action() {
|
|||
if [ "$?" != "0" ];then
|
||||
let fault_code=$fault_code+$FAULT_CPE_DOWNLOAD_FAILURE
|
||||
freecwmp_fault_output "" "$fault_code"
|
||||
exit 1
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
|
|||
3
xml.c
3
xml.c
|
|
@ -1848,6 +1848,9 @@ int cwmp_launch_download(struct download *pdownload, struct transfer_complete **
|
|||
}
|
||||
free(fault_code);
|
||||
}
|
||||
else {
|
||||
error = FAULT_CPE_INTERNAL_ERROR;
|
||||
}
|
||||
|
||||
p = calloc (1,sizeof(struct transfer_complete));
|
||||
if(p == NULL)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue