//
// Copyright (c) 1987-2024 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.
+// This program is open source software. Use, duplication, or disclosure is subject to the GNU General Public License version 3.
#include "sysdep.h"
#include <stdlib.h>
//
// Caller needs to free the result using free_recipients()
//
-struct recptypes *validate_recipients(char *supplied_recipients, const char *RemoteIdentifier, int Flags) {
+struct recptypes *validate_recipients(char *recipients_in, const char *REMOVE_THIS_UNUSED_VARIABLE, int Flags) {
struct recptypes *ret;
- char *recipients = NULL;
char append[SIZ];
long len;
int mailtype;
if (ret == NULL) return(NULL);
memset(ret, 0, sizeof(struct recptypes)); // set all values to null/zero
- if (supplied_recipients == NULL) {
- recipients = strdup("");
- }
- else {
- recipients = strdup(supplied_recipients);
- }
-
- len = strlen(recipients) + 1024; // allocate memory
+ len = strlen(recipients_in) + 1024; // allocate memory
ret->errormsg = malloc(len);
ret->recp_local = malloc(len);
ret->recp_internet = malloc(len);
ret->display_recp[0] = 0;
ret->recptypes_magic = RECPTYPES_MAGIC;
- Array *recp_array = split_recps(supplied_recipients, NULL);
+ Array *recp_array = split_recps(recipients_in, NULL);
char *aliases = CtdlGetSysConfig(GLOBAL_ALIASES); // First hit the Global Alias Table
ret->num_local, ret->num_room, ret->num_internet, ret->num_error
);
- free(recipients);
if (recp_array) {
array_free(recp_array);
}