Esempio n. 1
0
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;
}
Esempio n. 2
0
ATermList T_getAllValues(Table table)
{
  return ATtableValues((ATermTable)table);
}