mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 06:39:11 +00:00
49_IPCAM: fixed imageWithCallback using previous image
git-svn-id: https://svn.fhem.de/fhem/trunk@23916 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
196771a5e0
commit
169e34d580
@ -1,5 +1,6 @@
|
||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
||||
# Do not insert empty lines here, update check depends on it.
|
||||
- bugfix: 49_IPCAM: fixed imageWithCallback using previous image
|
||||
- change: 49_IPCAM: added 'get imageWithCallback'
|
||||
- change: 49_IPCAM: now unblocking and removed attribute 'loglevel'
|
||||
- change: 76_SMAInverter: change the etoday management
|
||||
|
@ -369,15 +369,10 @@ Get($@) {
|
||||
} elsif($arg eq "imageWithCallback") {
|
||||
|
||||
my $callbackCommand = join(" ", @a);
|
||||
Log3 $name, 5, "IPCAM ($name) - imageWithCallback command: $callbackCommand";
|
||||
my $error = AnalyzeCommand(undef, $callbackCommand);
|
||||
if (defined $error) {
|
||||
Log3 $name, 0, "IPCAM ($name) - imageWithCallback command invalid: $error";
|
||||
return undef;
|
||||
}
|
||||
Log3 $name, 0, "IPCAM ($name) - imageWithCallback command: $callbackCommand";
|
||||
|
||||
my $camUri = getSnapshot($hash, 1);
|
||||
Log3 $name, 5, "IPCAM ($name) - imageWithCallback camUri: $camUri";
|
||||
Log3 $name, 0, "IPCAM ($name) - imageWithCallback camUri: $camUri";
|
||||
|
||||
RequestSnapshotWithCallback($hash, $camUri, $callbackCommand);
|
||||
|
||||
@ -568,7 +563,14 @@ sub RequestSnapshot_Callback {
|
||||
|
||||
my $callbackCommand = $param->{callbackCommand};
|
||||
if (defined $callbackCommand) {
|
||||
Log3 $name, 5, "IPCAM ($name) - RequestSnapshotWithCallback executes $callbackCommand";
|
||||
Log3 $name, 0, "IPCAM ($name) - RequestSnapshotWithCallback executing $callbackCommand";
|
||||
|
||||
my $error = AnalyzeCommand(undef, $callbackCommand);
|
||||
if (defined $error) {
|
||||
Log3 $name, 0, "IPCAM ($name) - imageWithCallback command invalid: $error";
|
||||
return undef;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user