# HG changeset patch # User Michiel Broek # Date 1406487897 -7200 # Node ID f19a52a25ff5a83f07d1c4bbf0f2d0ba5d3b7ab2 # Parent 1b001de37945d29996bd095ca0cd5363fff48110 Small fix diff -r 1b001de37945 -r f19a52a25ff5 www-thermferm/profiles.php --- a/www-thermferm/profiles.php Sun Jul 27 17:06:08 2014 +0200 +++ b/www-thermferm/profiles.php Sun Jul 27 21:04:57 2014 +0200 @@ -314,12 +314,21 @@ if ($sock != false) { socket_write($sock, 'PROFILE PUTS '.$_POST['UUID'], 4096); for ($i = 1; $i <= 8; $i++) { - if ($_POST['steptime'.$i] > 0) + /* + * Use small delays so the remote really sees single lines. + * This is a real bug between client/server programming, + * the PHP side is line oriented, the server is reading blocks. + * So we just send the data slowly and the server just sees lines. + */ + if ($_POST['steptime'.$i] > 0) { + usleep(20000); socket_write($sock, $_POST['steptime'.$i].','.$_POST['resttime'.$i].','.$_POST['target'.$i], 4096); + } unset($_POST['steptime'.$i]); unset($_POST['resttime'.$i]); unset($_POST['target'.$i]); } + usleep(20000); socket_write($sock, '.', 4096); /* Absorb response */ while (1) {