Skip to content

Commit 0dcca0c

Browse files
committed
smtp: move transaction completion helpers
Simply makes the follow diff a little easier to read.
1 parent 8455efd commit 0dcca0c

1 file changed

Lines changed: 18 additions & 18 deletions

File tree

src/app-layer-smtp.c

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,24 @@ static inline void SMTPSetProgressTC(SMTPTransaction *tx, uint8_t progress)
237237
}
238238
}
239239

240+
static inline void SMTPTransactionCompleteTS(SMTPTransaction *tx)
241+
{
242+
DEBUG_VALIDATE_BUG_ON(tx == NULL);
243+
if (tx) {
244+
SMTPSetProgressTS(tx, SMTP_REQUEST_COMPLETE);
245+
SCLogDebug("marked tx as ts complete");
246+
}
247+
}
248+
249+
static inline void SMTPTransactionCompleteTC(SMTPTransaction *tx)
250+
{
251+
DEBUG_VALIDATE_BUG_ON(tx == NULL);
252+
if (tx) {
253+
SMTPSetProgressTC(tx, SMTP_RESPONSE_COMPLETE);
254+
SCLogDebug("marked tx as tc complete");
255+
}
256+
}
257+
240258
static bool SMTPTransactionRequestIsComplete(const SMTPTransaction *tx)
241259
{
242260
return tx && tx->progress_ts == SMTP_REQUEST_COMPLETE;
@@ -795,24 +813,6 @@ static inline void SMTPTransactionComplete(SMTPTransaction *tx)
795813
}
796814
}
797815

798-
static inline void SMTPTransactionCompleteTS(SMTPTransaction *tx)
799-
{
800-
DEBUG_VALIDATE_BUG_ON(tx == NULL);
801-
if (tx) {
802-
SMTPSetProgressTS(tx, SMTP_REQUEST_COMPLETE);
803-
SCLogDebug("marked tx as ts complete");
804-
}
805-
}
806-
807-
static inline void SMTPTransactionCompleteTC(SMTPTransaction *tx)
808-
{
809-
DEBUG_VALIDATE_BUG_ON(tx == NULL);
810-
if (tx) {
811-
SMTPSetProgressTC(tx, SMTP_RESPONSE_COMPLETE);
812-
SCLogDebug("marked tx as tc complete");
813-
}
814-
}
815-
816816
/**
817817
* \retval 0 ok
818818
* \retval -1 error

0 commit comments

Comments
 (0)