//
// Copyright (c) 1987-2022 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 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 open source software. Use, duplication, or disclosure
+// is subject to the terms of the GNU General Public License, version 3.
+// The program is distributed without any warranty, expressed or implied.
/*****************************************************************************
Tunable configuration parameters for the Berkeley DB back end
-/*
- * Copyright (c) 1987-2018 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 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.
- */
-
+//
+// Copyright (c) 1987-2022 by the citadel.org team
+//
+// This program is open source software. Use, duplication, or disclosure
+// is subject to the terms of the GNU General Public License, version 3.
+// The program is distributed without any warranty, expressed or implied.
#include "sysdep.h"
#include <stdlib.h>
#include "ctdl_module.h"
-/*
- * Figure out which time zone needs to be used for timestamps that are
- * not UTC and do not have a time zone specified.
- */
+// Figure out which time zone needs to be used for timestamps that are
+// not UTC and do not have a time zone specified.
icaltimezone *get_default_icaltimezone(void) {
icaltimezone *zone = NULL;
-/*
- * DNS lookup for SMTP sender
- *
- * Copyright (c) 1987-2021 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 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.
- */
+// DNS lookup for SMTP sender
+//
+// Copyright (c) 1987-2022 by the citadel.org team
+//
+// This program is open source software. Use, duplication, or disclosure
+// is subject to the terms of the GNU General Public License, version 3.
+// The program is distributed without any warranty, expressed or implied.
#include "sysdep.h"
#include <stdio.h>
#include "internet_addressing.h"
-/*
- * get_hosts() checks the Internet configuration for various types of
- * entries and returns them in the same format as getmx() does -- fill the
- * buffer with a delimited list of hosts and return the number of hosts.
- *
- * This is used to fetch MX smarthosts, SpamAssassin hosts, etc.
- */
+// get_hosts() checks the Internet configuration for various types of
+// entries and returns them in the same format as getmx() does -- fill the
+// buffer with a delimited list of hosts and return the number of hosts.
+//
+// This is used to fetch MX smarthosts, SpamAssassin hosts, etc.
int get_hosts(char *mxbuf, char *rectype) {
int config_lines;
int i;
}
-/*
- * Compare the preference of two MX records. First check by the actual
- * number listed in the MX record. If they're identical, randomize the
- * result.
- */
+// Compare the preference of two MX records. First check by the actual
+// number listed in the MX record. If they're identical, randomize the
+// result.
int mx_compare_pref(const void *mx1, const void *mx2) {
int pref1;
int pref2;
}
-/*
- * getmx()
- *
- * Return one or more MX's for a mail destination.
- *
- * Upon success, it fills 'mxbuf' with one or more MX hosts, separated by
- * vertical bar characters, and returns the number of hosts as its return
- * value. If no MX's are found, it returns 0.
- *
- */
+// getmx()
+//
+// Return one or more MX's for a mail destination.
+//
+// Upon success, it fills 'mxbuf' with one or more MX hosts, separated by
+// vertical bar characters, and returns the number of hosts as its return
+// value. If no MX's are found, it returns 0.
int getmx(char *mxbuf, char *dest) {
#ifdef HAVE_RESOLV_H
//
// Copyright (c) 1987-2022 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 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 open source software. Use, duplication, or disclosure
+// is subject to the terms of the GNU General Public License, version 3.
+// The program is distributed without any warranty, expressed or implied.
#include "sysdep.h"
#include <stdio.h>
#include <libcitadel.h>
-
#include "citserver.h"
#include "room_ops.h"
if (!threading) {
CtdlRegisterProtoHook(cmd_euid, "EUID", "Perform operations on Extended IDs for messages");
}
- /* return our id for the log */
+ // return our id for the log
return "euidindex";
}
+// This program is open source software. Use, duplication, or disclosure
+// is subject to the terms of the GNU General Public License, version 3.
+// The program is distributed without any warranty, expressed or implied.
+
+
/*
* Function to generate RFC822-compliant textual time/date stamp
*/
-/*
- * This file contains miscellaneous housekeeping tasks.
- *
- * Copyright (c) 1987-2021 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 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 file contains miscellaneous housekeeping tasks.
+//
+// Copyright (c) 1987-2021 by the citadel.org team
+//
+// This program is open source software. Use, duplication, or disclosure
+// is subject to the terms of the GNU General Public License, version 3.
+// The program is distributed without any warranty, expressed or implied.
+
#include <stdio.h>
#include <libcitadel.h>
}
-/*
- * Check (and fix) floor reference counts. This doesn't need to be done
- * very often, since the counts should remain correct during normal operation.
- */
+// Check (and fix) floor reference counts. This doesn't need to be done
+// very often, since the counts should remain correct during normal operation.
void check_ref_counts_backend(struct ctdlroom *qrbuf, void *data) {
int *new_refcounts;
}
-/*
- * Provide hints as to whether we have any memory leaks
- */
+// Provide hints as to whether we have any memory leaks
void keep_an_eye_on_memory_usage(void) {
static void *original_brk = NULL;
if (!original_brk) original_brk = sbrk(0); // Remember the original program break so we can test for leaks
}
-/*
- * This is the housekeeping loop. Worker threads come through here after
- * processing client requests but before jumping back into the pool. We
- * only allow housekeeping to execute once per minute, and we only allow one
- * instance to run at a time.
- */
+// This is the housekeeping loop. Worker threads come through here after
+// processing client requests but before jumping back into the pool. We
+// only allow housekeeping to execute once per minute, and we only allow one
+// instance to run at a time.
static int housekeeping_in_progress = 0;
static int housekeeping_disabled = 0;
static time_t last_timer = 0L;
return;
}
- /*
- * We do it this way instead of wrapping the whole loop in an
- * S_HOUSEKEEPING critical section because it eliminates the need to
- * potentially have multiple concurrent mutexes in progress.
- */
+ // We do it this way instead of wrapping the whole loop in an
+ // S_HOUSEKEEPING critical section because it eliminates the need to
+ // potentially have multiple concurrent mutexes in progress.
begin_critical_section(S_HOUSEKEEPING);
if (housekeeping_in_progress == 0) {
do_housekeeping_now = 1;
return;
}
- /*
- * Ok, at this point we've made the decision to run the housekeeping
- * loop. Everything below this point is real work.
- */
+ // Ok, at this point we've made the decision to run the housekeeping
+ // loop. Everything below this point is real work.
if ( (now - last_timer) > (time_t)60 ) {
do_perminute_housekeeping_now = 1;
last_timer = time(NULL);
}
- /* First, do the "as often as needed" stuff... */
+ // First, do the "as often as needed" stuff...
JournalRunQueue();
PerformSessionHooks(EVT_HOUSE);
- /* Then, do the "once per minute" stuff... */
+ // Then, do the "once per minute" stuff...
if (do_perminute_housekeeping_now) {
cdb_check_handles();
PerformSessionHooks(EVT_TIMER); // Run all registered TIMER hooks
keep_an_eye_on_memory_usage();
}
- /*
- * All done.
- */
+ // All done.
begin_critical_section(S_HOUSEKEEPING);
housekeeping_in_progress = 0;
end_critical_section(S_HOUSEKEEPING);
//
// Copyright (c) 1987-2022 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 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 open source software. Use, duplication, or disclosure
+// is subject to the terms of the GNU General Public License, version 3.
+// The program is distributed without any warranty, expressed or implied.
#include "sysdep.h"
#include <stdlib.h>
-/*
- * Message journaling functions.
- *
- * Copyright (c) 1987-2020 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 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.
- */
+// Message journaling functions.
+//
+// Copyright (c) 1987-2022 by the citadel.org team
+//
+// This program is open source software. Use, duplication, or disclosure
+// is subject to the terms of the GNU General Public License, version 3.
+// The program is distributed without any warranty, expressed or implied.
#include <stdio.h>
#include <libcitadel.h>
JournalRunQueueMsg(jptr);
}
}
-
-
//
// Copyright (c) 2011-2022 by the citadel.org development 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 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 open source software. Use, duplication, or disclosure
+// is subject to the terms of the GNU General Public License, version 3.
+// The program is distributed without any warranty, expressed or implied.
// ldapsearch -D uid=admin,cn=users,cn=compat,dc=demo1,dc=freeipa,dc=org -w Secret123 -h ipa.demo1.freeipa.org