void StackElement::gatherPoolPending(CIArrayOf<StackElement> & pending) { if (prev && !prev->IsShared()) pending.append(*prev.getClear()); if (sibling && !sibling->IsShared()) pending.append(*sibling.getClear()); }
void add(RemoteFilename &filename,unsigned partno,unsigned copy,unsigned crc) { CFileCrcItem *item = new CFileCrcItem(); item->filename.set(filename); item->partno = partno; item->copy = copy; item->crc = crc; item->requiredcrc = crc; list.append(*item); }
//--------------------------------------------------------------------------- void doUnwindRelease(GrammarSymbol * symbol, CIArrayOf<GrammarSymbol> & pending) { if (!symbol->isPacked()) { unsigned level = pending.ordinality(); unsigned num = symbol->numChildren(); for (unsigned i = 0; i < num; i++) pending.append(*LINK(symbol->queryChild(i))); if (!symbol->Release()) pending.trunc(level); } else symbol->Release(); }
static void loadMachineMap() { if (machinelist.ordinality()) return; Owned<IRemoteConnection> conn = querySDS().connect("/Environment/Hardware", myProcessSession(), RTM_LOCK_READ, SDS_LOCK_TIMEOUT); if (!conn) return; IPropertyTree* root = conn->queryRoot(); Owned<IPropertyTreeIterator> machines= root->getElements("Computer"); if (machines->first()) { do { IPropertyTree &machine = machines->query(); SocketEndpoint ep(machine.queryProp("@netAddress")); ep.port = getDaliServixPort(); const char *name = machine.queryProp("@name"); const char *state=machine.queryProp("@state"); CMachineEntry *entry = new CMachineEntry(name,ep,!state||stricmp(state,"Available")==0); machinemap.setValue(name, entry); machinelist.append(*entry); } while (machines->next()); } }
void addAbortHandler(IAbortHandler & handler) { CriticalBlock c(abortCrit); queryInstallAbortHandler(); handlers.append(*new AbortHandlerInfo(&handler)); }