예제 #1
0
파일: amq.c 프로젝트: raven-au/am-utils-6.1
static char *
cluster_server(void)
{
  struct cct_entry *cp;

  if (cnodeid() == 0) {
    /*
     * Not clustered
     */
    return def_server;
  }
  while (cp = getccent())
    if (cp->cnode_type == 'r')
      return cp->cnode_name;

  return def_server;
}
예제 #2
0
파일: pawd.c 프로젝트: enukane/netbsd-src
static char *
cluster_server(void)
{
# ifdef HAVE_EXTERN_GETCCENT
  struct cct_entry *cp;
# endif /* HAVE_EXTERN_GETCCENT */

  if (cnodeid() == 0)
    return localhost;

# ifdef HAVE_EXTERN_GETCCENT
  while ((cp = getccent()))
    if (cp->cnode_type == 'r')
      return cp->cnode_name;
# endif /* HAVE_EXTERN_GETCCENT */

  return localhost;
}