From 3aecc617c3fd761f98362bcd567d82017c59fb22 Mon Sep 17 00:00:00 2001 From: Jean Paul Galea Date: Fri, 17 Jul 2015 23:35:15 +0200 Subject: [PATCH] Fix bug. - this was not introduced by my refactoring. - LOG_ALERT for; yk_low, yk_high, nonce was written only if yk_use failed to be parsed. - as a result, this commit might change LOG_ALERT output. --- ykval-synclib.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ykval-synclib.php b/ykval-synclib.php index 7028d66..f8e0eff 100644 --- a/ykval-synclib.php +++ b/ykval-synclib.php @@ -233,19 +233,19 @@ class SyncLib } $resParams['yk_use']=$out[1]; - preg_match("/^yk_high=(-1|[0-9]+)/m", $str, $out); + $i = preg_match("/^yk_high=(-1|[0-9]+)/m", $str, $out); if ($i != 1) { $this->log(LOG_ALERT, "cannot parse high value: $str"); } $resParams['yk_high']=$out[1]; - preg_match("/^yk_low=(-1|[0-9]+)/m", $str, $out); + $i = preg_match("/^yk_low=(-1|[0-9]+)/m", $str, $out); if ($i != 1) { $this->log(LOG_ALERT, "cannot parse low value: $str"); } $resParams['yk_low']=$out[1]; - preg_match("/^nonce=([[:alnum:]]+)/m", $str, $out); + $i = preg_match("/^nonce=([[:alnum:]]+)/m", $str, $out); if ($i != 1) { $this->log(LOG_ALERT, "cannot parse counter value: $str"); }