From: Art Cancro Date: Mon, 27 Feb 2012 21:40:52 +0000 (-0500) Subject: Show system contexts when RWHO is run via admin socket X-Git-Tag: v8.11~160^2 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=52a94413dd96f0abc1642535ac3a67427062d1b0 Show system contexts when RWHO is run via admin socket --- diff --git a/citadel/config.c b/citadel/config.c index 78a01d074..5328e3036 100644 --- a/citadel/config.c +++ b/citadel/config.c @@ -42,9 +42,7 @@ void brand_new_installation_set_defaults(void) { uname(&my_utsname); /* set some sample/default values in place of blanks... */ - char c_nodename[256]; - safestrncpy(c_nodename, my_utsname.nodename, sizeof c_nodename); - strtok(config.c_nodename, "."); + extract_token(config.c_nodename, my_utsname.nodename, 0, '.', sizeof config.c_nodename); if (IsEmptyStr(config.c_fqdn) ) { if ((he = gethostbyname(my_utsname.nodename)) != NULL) { safestrncpy(config.c_fqdn, he->h_name, sizeof config.c_fqdn); diff --git a/citadel/modules/rwho/serv_rwho.c b/citadel/modules/rwho/serv_rwho.c index 0aed437ce..09e256f86 100644 --- a/citadel/modules/rwho/serv_rwho.c +++ b/citadel/modules/rwho/serv_rwho.c @@ -4,19 +4,14 @@ * * Copyright (c) 1987-2012 by the citadel.org team * - * This program is open source software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 3. - * - * + * This program is open source software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 3. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * - * - * */ #include "sysdep.h" @@ -76,8 +71,6 @@ void cmd_rwho(char *argbuf) { /* So that we don't keep the context list locked for a long time * we create a copy of it first */ - - nptr = CtdlGetContextArray(&nContexts) ; if (!nptr) { @@ -87,7 +80,7 @@ void cmd_rwho(char *argbuf) { return; } - aide = (CC->user.axlevel >= AxAideU) ; + aide = ( (CC->user.axlevel >= AxAideU) || (CC->internal_pgm) ) ; cprintf("%d%c \n", LISTING_FOLLOWS, CtdlCheckExpress() ); for (i=0; i