X-Git-Url: https://code.citadel.org/?p=citadel.git;a=blobdiff_plain;f=citadel%2Finternet_addressing.c;fp=citadel%2Finternet_addressing.c;h=e67a9dc12c7a482f5e07a5a74d7c3f79a9da2e24;hp=e4bd18a6e4b08fbbf47c35203adbfb734869d9c8;hb=547a20bfefa1815d5bef48bc2a6b24cf38736c09;hpb=ed47669c2e35647dc288f9cfa0186565788b9ed1 diff --git a/citadel/internet_addressing.c b/citadel/internet_addressing.c index e4bd18a6e..e67a9dc12 100644 --- a/citadel/internet_addressing.c +++ b/citadel/internet_addressing.c @@ -1618,22 +1618,19 @@ void CtdlRebuildDirectoryIndex(void) { } -/* - * Configure Internet email addresses for a user account, updating the Directory Index in the process - */ -void CtdlSetEmailAddressesForUser(char *requested_user, char *new_emailaddrs) -{ +// Configure Internet email addresses for a user account, updating the Directory Index in the process +void CtdlSetEmailAddressesForUser(char *requested_user, char *new_emailaddrs) { struct ctdluser usbuf; int i; char buf[SIZ]; - if (CtdlGetUserLock(&usbuf, requested_user) != 0) { // We are relying on the fact that the DirectoryIndex functions don't lock. - return; // Silently fail here if we can't acquire a lock on the user record. + if (CtdlGetUserLock(&usbuf, requested_user) != 0) { // We can lock because the DirectoryIndex functions don't lock. + return; // Silently fail here if the specified user does not exist. } syslog(LOG_DEBUG, "internet_addressing: setting email addresses for <%s> to <%s>", usbuf.fullname, new_emailaddrs); - /* Delete all of the existing directory index records for the user (easier this way) */ + // Delete all of the existing directory index records for the user (easier this way) for (i=0; i