}
if (!fdname)
{
- addr->transport_return = PANIC;
addr->message = string_sprintf("Mandatory file or directory option "
"missing from %s transport", tblock->name);
- return FALSE;
+ goto ret_panic;
}
}
if ((ob->maildir_format || ob->mailstore_format) && !isdirectory)
{
- addr->transport_return = PANIC;
addr->message = string_sprintf("mail%s_format requires \"directory\" "
"to be specified for the %s transport",
ob->maildir_format ? "dir" : "store", tblock->name);
- return FALSE;
+ goto ret_panic;
}
if (!(path = expand_string(fdname)))
{
- addr->transport_return = PANIC;
addr->message = string_sprintf("Expansion of \"%s\" (file or directory "
"name for %s transport) failed: %s", fdname, tblock->name,
expand_string_message);
- return FALSE;
+ goto ret_panic;
}
if (path[0] != '/')
to the true local part. */
if (testflag(addr, af_file))
- for (address_item * addr2 = addr; addr2 != NULL; addr2 = addr2->next)
+ for (address_item * addr2 = addr; addr2; addr2 = addr2->next)
addr2->local_part = string_copy(path);
/* The available mailbox formats depend on whether it is a directory or a file
{
if (!(check_path = expand_string(ob->quota_directory)))
{
- addr->transport_return = PANIC;
addr->message = string_sprintf("Expansion of \"%s\" (quota_directory "
"name for %s transport) failed: %s", ob->quota_directory,
tblock->name, expand_string_message);
- return FALSE;
+ goto ret_panic;
}
if (check_path[0] != '/')
if (nametag && !expand_string(nametag) && !f.expand_string_forcedfail)
{
- addr->transport_return = PANIC;
addr->message = string_sprintf("Expansion of \"%s\" (maildir_tag "
"for %s transport) failed: %s", nametag, tblock->name,
expand_string_message);
- return FALSE;
+ goto ret_panic;
}
/* We ensured the existence of all the relevant directories above. Attempt
if (!(env_file = fdopen(fd, "wb")))
{
addr->basic_errno = errno;
- addr->transport_return = PANIC;
addr->message = string_sprintf("fdopen of %s ("
"for %s transport) failed", filename, tblock->name);
(void)close(fd);
Uunlink(filename);
- return FALSE;
+ goto ret_panic;
}
/* Write the envelope file, then close it. */
{
if (!f.expand_string_forcedfail)
{
- addr->transport_return = PANIC;
addr->message = string_sprintf("Expansion of \"%s\" (mailstore "
"prefix for %s transport) failed: %s", ob->mailstore_prefix,
tblock->name, expand_string_message);
(void)fclose(env_file);
Uunlink(filename);
- return FALSE;
+ goto ret_panic;
}
}
else
{
if (!f.expand_string_forcedfail)
{
- addr->transport_return = PANIC;
addr->message = string_sprintf("Expansion of \"%s\" (mailstore "
"suffix for %s transport) failed: %s", ob->mailstore_suffix,
tblock->name, expand_string_message);
(void)fclose(env_file);
Uunlink(filename);
- return FALSE;
+ goto ret_panic;
}
}
else
put in the first address of a batch. */
return FALSE;
+
+ret_panic:
+ addr->transport_return = PANIC;
+ return FALSE;
}
#endif /*!MACRO_PREDEF*/