String explicitAcct = getAccountId().equals(zc.getAuthtokenAccountId()) ? null : getAccountId();
String explicitAcct = getAccountId().equals(zsc.getAuthtokenAccountId()) ? null : getAccountId();
    public Element putNotifications(ZimbraSoapContext zc, Element ctxt, int lastKnownSeqno) {        if (ctxt == null)            return null;        Mailbox mbox;        try {            mbox = Mailbox.getMailboxByAccountId(getAccountId());        } catch (ServiceException e) {            ZimbraLog.session.warn("error fetching mailbox for account " + getAccountId(), e);            return ctxt;        }        String explicitAcct = getAccountId().equals(zc.getAuthtokenAccountId()) ? null : getAccountId();        // must lock the Mailbox before locking the Session to avoid deadlock        //   because ToXML functions can now call back into the Mailbox        synchronized (mbox) {            synchronized (this) {                // send the <change> block                // <change token="555" [acct="4f778920-1a84-11da-b804-6b188d2a20c4"]/>                ctxt.addUniqueElement(ZimbraSoapContext.E_CHANGE)                    .addAttribute(ZimbraSoapContext.A_CHANGE_ID, mbox.getLastChangeID())                    .addAttribute(ZimbraSoapContext.A_ACCOUNT_ID, explicitAcct);                                if (mSentChanges.size() > 100) {                    // cover ourselves in case a client is doing something really stupid...                    ZimbraLog.session.warn("Notification Change List abnormally long, misbehaving client.");                    mSentChanges.clear();                }                                // first, clear any PM's we now know the client has received                for (Iterator<PendingModifications> iter = mSentChanges.iterator(); iter.hasNext(); ) {                    PendingModifications pm = iter.next();                    if (pm.getSeqNo() <= lastKnownSeqno)                        iter.remove();//                     assert(pm.getSeqNo() > lastKnownSeqno);                }                                if (mNotify) {                    if (mChanges.hasNotifications()) {                        assert(mChanges.getSeqNo() >= 1);                        int newSeqNo = mChanges.getSeqNo() + 1;                        mSentChanges.add(mChanges);                        mChanges = new PendingModifications(newSeqNo);                     }                    // drop out if notify is off or if there is nothing to send                    if (mSentChanges.isEmpty())                        return ctxt;                                    // mChanges must be empty at this point (everything moved into the mSentChanges list)                    assert(!mChanges.hasNotifications());                                    // send all the old changes                    for (PendingModifications pm : mSentChanges)                        putPendingModifications(zc, pm, ctxt, mbox, explicitAcct);                }            }        }        return ctxt;    }