From e6d4328def22b5493883ba02d9091c095541e4e1 Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Sun, 21 Jun 2015 06:27:02 +0000 Subject: [PATCH] 01_FHEMWEB.pm: Color SVG for /icon/ (Forum #38294), fix potential iOS problems (Forum #20294) git-svn-id: https://svn.fhem.de/fhem/trunk@8788 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/01_FHEMWEB.pm | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/fhem/FHEM/01_FHEMWEB.pm b/fhem/FHEM/01_FHEMWEB.pm index 24cd2692f..0d6d36100 100755 --- a/fhem/FHEM/01_FHEMWEB.pm +++ b/fhem/FHEM/01_FHEMWEB.pm @@ -431,9 +431,8 @@ FW_Read($$) } my $cacheable = FW_answerCall($arg); - if($cacheable == -1){ - # Longpoll / inform request; - POSIX::exit(0) if($hash->{isChild}); + if($cacheable == -1) { + FW_closeConn($hash); return; } @@ -468,7 +467,7 @@ FW_Read($$) delete($defs{$name}); } - POSIX::exit(0) if($hash->{isChild}); + FW_closeConn($hash); } sub @@ -525,10 +524,14 @@ FW_answerCall($) # if we do not have the icon, we convert the device state to the icon name if(!$iconPath) { - ($icon, undef, undef) = FW_dev2image($icon); + my ($img, $link, $isHtml) = FW_dev2image($icon); $cacheable = 0; - return 0 if(!$icon); - $iconPath = FW_iconPath($icon); + return 0 if(!$img); + $iconPath = FW_iconPath($img); + if($iconPath =~ m/\.svg$/i) { + FW_pO FW_makeImage($img, $img); + return 0; + } } $iconPath =~ m/(.*)\.([^.]*)/; return FW_serveSpecial($1, $2, $FW_icondir, $cacheable);