Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
elphel-web-393
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Elphel
elphel-web-393
Commits
8a13c1a4
Commit
8a13c1a4
authored
Dec 20, 2016
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed broadcast mask for GET requests
parent
703582df
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
26 deletions
+32
-26
parsedit.php
src/php_top/parsedit.php
+32
-26
No files found.
src/php_top/parsedit.php
View file @
8a13c1a4
...
...
@@ -808,6 +808,7 @@ function applyPost_debug($todo,$noFinalWait=false) {
}
}
$broadcast_sorted
=
split_broadcast
(
$pgmpars
);
ksort
(
$broadcast_sorted
);
$frame_to_apply
=
$frame_zero
+
$since
;
if
(
$since
<
0
){
...
...
@@ -932,6 +933,7 @@ function split_broadcast($pgmpars){
unset
(
$pgmpars
[
$name
]);
}
}
$broadcast
=
array
(
0
=>
array
());
foreach
(
$port_masks
as
$key
=>
$value
){
// if (!in_array($value,$broadcast)) $broadcast[] = $value;
...
...
@@ -961,9 +963,6 @@ function parsePost() {
$posted_params
[
$index
][
$name
]
=
$value
;
}
}
// file_put_contents("/tmp/parse_post.log",print_r($_POST,1));
// file_put_contents("/tmp/posted_params.log",print_r($posted_params,1));
}
/// Simulate POST from URL parameters if 'immediate' is present in the URL
function
convertImmediateMode
(){
...
...
@@ -976,6 +975,7 @@ function convertImmediateMode(){
'oldval'
=>
$param
[
'cur_value'
],
'paramdec'
=>
$param
[
'value'
],
/// 'paramhex' is not used
'delay'
=>
$param
[
'ahead'
],
'broadcast'
=>
$param
[
'port_mask'
],
'apply'
=>
$param
[
'write_en'
]
&&
$param
[
'modified'
]
);
}
...
...
@@ -985,6 +985,7 @@ function convertImmediateMode(){
'oldval'
=>
$param
[
'cur_value'
],
'paramdec'
=>
$param
[
'value'
],
/// 'paramhex' is not used
'delay'
=>
$param
[
'ahead'
],
'broadcast'
=>
$param
[
'port_mask'
],
'apply'
=>
$param
[
'write_en'
]
&&
$param
[
'modified'
]
);
}
...
...
@@ -1094,6 +1095,7 @@ function parseGetNames() {
if
(
!
$embedImageScale
)
$embedImageScale
=
$defaultEmbedImageScale
;
}
else
if
(
$key
==
'_time'
)
{
}
else
if
(
$key
==
'sensor_port'
)
{
}
else
if
(
$key
[
0
]
==
'*'
)
{
}
else
{
/// locate $key among constants, accept numeric values also
...
...
@@ -1117,6 +1119,10 @@ function parseGetNames() {
$value
=
substr
(
$value
,
strpos
(
$value
,
"!"
)
+
1
);
}
if
(
isset
(
$_GET
[
"*
$key
"
]))
{
$port_mask
=
myval
(
$_GET
[
"*
$key
"
]);
}
$write_en
=
(
!
(
$value
[
0
]
==
"@"
));
if
(
!
$write_en
)
{
if
(
strlen
(
$value
)
==
1
)
$value
=
""
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment