smtp: move transaction completion helpers

Simply makes the follow diff a little easier to read.

(cherry picked from commit 2676d1bc83)
pull/16050/head
Jason Ish 2 months ago committed by Victor Julien
parent 39f7dd3262
commit 833e54a705

@ -237,6 +237,24 @@ static inline void SMTPSetProgressTC(SMTPTransaction *tx, uint8_t progress)
}
}
static inline void SMTPTransactionCompleteTS(SMTPTransaction *tx)
{
DEBUG_VALIDATE_BUG_ON(tx == NULL);
if (tx) {
SMTPSetProgressTS(tx, SMTP_REQUEST_COMPLETE);
SCLogDebug("marked tx as ts complete");
}
}
static inline void SMTPTransactionCompleteTC(SMTPTransaction *tx)
{
DEBUG_VALIDATE_BUG_ON(tx == NULL);
if (tx) {
SMTPSetProgressTC(tx, SMTP_RESPONSE_COMPLETE);
SCLogDebug("marked tx as tc complete");
}
}
static bool SMTPTransactionRequestIsComplete(const SMTPTransaction *tx)
{
return tx && tx->progress_ts == SMTP_REQUEST_COMPLETE;
@ -787,24 +805,6 @@ static inline void SMTPTransactionComplete(SMTPTransaction *tx)
}
}
static inline void SMTPTransactionCompleteTS(SMTPTransaction *tx)
{
DEBUG_VALIDATE_BUG_ON(tx == NULL);
if (tx) {
SMTPSetProgressTS(tx, SMTP_REQUEST_COMPLETE);
SCLogDebug("marked tx as ts complete");
}
}
static inline void SMTPTransactionCompleteTC(SMTPTransaction *tx)
{
DEBUG_VALIDATE_BUG_ON(tx == NULL);
if (tx) {
SMTPSetProgressTC(tx, SMTP_RESPONSE_COMPLETE);
SCLogDebug("marked tx as tc complete");
}
}
/**
* \retval 0 ok
* \retval -1 error

Loading…
Cancel
Save