imap-send: use server conf argument in setup_curl()
commit84d689a810842c44d95ac759d39702dfa170093b
authorJeff King <peff@peff.net>
Mon, 3 Jul 2023 06:33:30 +0000 (3 02:33 -0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 5 Jul 2023 17:16:53 +0000 (5 10:16 -0700)
tree1f2c15f1463d0baa98076e8aa5fb5c747f83299f
parentfb7d80edcae482f4fa5d4be0227dc3054734e5f3
imap-send: use server conf argument in setup_curl()

Our caller passes in an imap_server_conf struct, but we ignore it
totally, and instead read the config directly from the global "server"
variable. This works OK, since our sole caller will pass in that same
global variable. But the intent seems to have been to use the passed-in
variable, as otherwise it has no purpose (and many other functions use
the same pattern).

Let's use the passed-in value, which also silences a -Wunused-parameter
warning.

It would be nice if "server" was not a global here, as we could avoid
making similar mistakes. But changing that would be a larger refactor,
as it must be accessed as a global in a few spots (e.g., filling it in
with the config callback).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
imap-send.c