Skip to content

Commit

Permalink
lmtp: common: Rename struct lmtp_recipient *rcpt variables to *lrcpt.
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanbosch committed Oct 11, 2018
1 parent a220f90 commit 325ae4e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
38 changes: 19 additions & 19 deletions src/lmtp/lmtp-common.c
Expand Up @@ -4,46 +4,46 @@
#include "smtp-server.h"
#include "lmtp-common.h"

void lmtp_recipient_init(struct lmtp_recipient *rcpt,
void lmtp_recipient_init(struct lmtp_recipient *lrcpt,
struct client *client,
enum lmtp_recipient_type type,
struct smtp_server_cmd_ctx *cmd,
struct smtp_server_cmd_rcpt *data)
{
rcpt->client = client;
rcpt->type = type;
rcpt->rcpt_cmd = cmd;
rcpt->path = data->path;
lrcpt->client = client;
lrcpt->type = type;
lrcpt->rcpt_cmd = cmd;
lrcpt->path = data->path;
}

void lmtp_recipient_finish(struct lmtp_recipient *rcpt,
void lmtp_recipient_finish(struct lmtp_recipient *lrcpt,
struct smtp_server_recipient *trcpt,
unsigned int index)
{
trcpt->context = rcpt;
trcpt->context = lrcpt;

rcpt->path = trcpt->path;
rcpt->rcpt = trcpt;
rcpt->index = index;
rcpt->rcpt_cmd = NULL;
lrcpt->path = trcpt->path;
lrcpt->rcpt = trcpt;
lrcpt->index = index;
lrcpt->rcpt_cmd = NULL;
}

struct lmtp_recipient *
lmtp_recipient_find_duplicate(struct lmtp_recipient *rcpt,
lmtp_recipient_find_duplicate(struct lmtp_recipient *lrcpt,
struct smtp_server_transaction *trans)
{
struct smtp_server_recipient *drcpt;
struct lmtp_recipient *dup_rcpt;
struct lmtp_recipient *dup_lrcpt;

i_assert(rcpt->rcpt != NULL);
drcpt = smtp_server_transaction_find_rcpt_duplicate(trans, rcpt->rcpt);
i_assert(lrcpt->rcpt != NULL);
drcpt = smtp_server_transaction_find_rcpt_duplicate(trans, lrcpt->rcpt);
if (drcpt == NULL)
return NULL;

dup_rcpt = drcpt->context;
i_assert(dup_rcpt->rcpt == drcpt);
i_assert(dup_rcpt->type == rcpt->type);
dup_lrcpt = drcpt->context;
i_assert(dup_lrcpt->rcpt == drcpt);
i_assert(dup_lrcpt->type == lrcpt->type);

return dup_rcpt;
return dup_lrcpt;
}

6 changes: 3 additions & 3 deletions src/lmtp/lmtp-common.h
Expand Up @@ -22,18 +22,18 @@ struct lmtp_recipient {
unsigned int index;
};

void lmtp_recipient_init(struct lmtp_recipient *rcpt,
void lmtp_recipient_init(struct lmtp_recipient *lrcpt,
struct client *client,
enum lmtp_recipient_type type,
struct smtp_server_cmd_ctx *cmd,
struct smtp_server_cmd_rcpt *data);

void lmtp_recipient_finish(struct lmtp_recipient *rcpt,
void lmtp_recipient_finish(struct lmtp_recipient *lrcpt,
struct smtp_server_recipient *trcpt,
unsigned int index);

struct lmtp_recipient *
lmtp_recipient_find_duplicate(struct lmtp_recipient *rcpt,
lmtp_recipient_find_duplicate(struct lmtp_recipient *lrcpt,
struct smtp_server_transaction *trans);

#endif

0 comments on commit 325ae4e

Please sign in to comment.