static EM_Session findSession(const char *path) { ATermList sessionList; assert(path != NULL); sessionList = ATtableValues(sessions); while (!ATisEmpty(sessionList)) { EM_Session session = EM_SessionFromTerm(ATgetFirst(sessionList)); const char *peerPath = EM_getSessionPath(session); if (strcmp(peerPath, path) == 0) { return session; } sessionList = ATgetNext(sessionList); } return NULL; }
ATermList T_getAllValues(Table table) { return ATtableValues((ATermTable)table); }