Bugs #3051: felamimail/esync - PUSH ... no pushmail?

Ticket modified by Klaus Leithoff at 2011/10/11 18:13
Tracking SystemBugs
CategoryFelamiMail
VersionTrunk
StatusClosed
ResolutionFixed
Completed100%
Priority5 - medium
Created bycamel camel
Created on2011/10/11 17:11
Assigned toRalf Becker
Ccphilip herbert
Summary#3051 - felamimail/esync - PUSH … no pushmail ?
the push doesn’t work for me on trunk …
if i remove the static var $folderStatus, then it works.

do i have any other problem - maybe php config problem or what is ongoing here ?

the function does always retunr the same value back (and not the real changes …)
so, it seems to be, that deliver always the same values from first request of this session …

if i remove the statis, then push on activesync is wokring …

/var/www/egroupware_TRUNK/htdocs/egroupware/felamimail/inc/class.felamimail_bo.inc.php [-M–] 0 L:[1001+47 1048/4847] *(37246/195380b) 0009 0x009
function _getStatus($folderName)
{

  •        static $folderStatus;
          if (isset($folderStatus[$this->icServer->ImapServerId][$folderName]))
          {
              //error_log(__METHOD__.__LINE__.' Using cache for status on Server:'.$this->icServer->ImapServerId.' for folder:'.$folderName.'->'.array2string($folderStatus[$this->icServer->ImapServerId][$folderName]));
              return $folderStatus[$this->icServer->ImapServerId][$folderName];
          }
          $folderStatus[$this->icServer->ImapServerId][$folderName] = $this->icServer->getStatus($folderName);
          return $folderStatus[$this->icServer->ImapServerId][$folderName];
      }
    

Comment by Klaus Leithoff at 2011/10/11 18:13:
This bug is fixed in our subversion repository now.

You can update via subversion with the following commands:
cd /path/to/egroupware
svn update * # mind the */asterisk

To check if you have svn installed try running svn version. To install the svn command under Linux install the package “subversion”. For Windows you can use eg. TortoiseSVN (tortoisesvn.tigris.org).
Comment by camel camel at 2011/10/11 17:53:
hmm, strange, but - definitve working if i remove the static
anyhow … to set this var all the time as static ?
is it then not neccesary to flush it after set request ?
next the code … hmm, make doubl request to poor imap server …
if isset(request status) …
then (request status) …
hmm, not sure, if this a good idea …
but, for what do we need it static ?
i can try the code with an flush it it … ?
Comment by Klaus Leithoff at 2011/10/11 17:47:
problem may be, that, we have one long request going on.
hmmm. the static should have a scope of only one request at a time.

Linked entries:
https://community.egroupware.org/egroupware/index.php?menuaction=tracker.tracker_ui.edit&tr_id=3051&no_popup=1