Skip to content

Commit db21ab6

Browse files
authored
Merge pull request #139 from Googulator/tls-newline-fix
Add terminating newline also for TLS connections
2 parents cb728a8 + bdb3cad commit db21ab6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/netlog/netlog-protocol.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ int format_rfc5424(Manager *m,
163163
/* Last Optional newline message separator, if not implicitly terminated by end of UDP frame
164164
* De facto standard: separate messages by a newline
165165
*/
166-
if (m->protocol == SYSLOG_TRANSMISSION_PROTOCOL_TCP)
166+
if (m->protocol == SYSLOG_TRANSMISSION_PROTOCOL_TCP || m->protocol == SYSLOG_TRANSMISSION_PROTOCOL_TLS)
167167
IOVEC_SET_STRING(iov[n++], "\n");
168168

169169
return protocol_send(m, iov, n);
@@ -232,7 +232,7 @@ int format_rfc3339(Manager *m,
232232
/* Last Optional newline message separator, if not implicitly terminated by end of UDP frame
233233
* De facto standard: separate messages by a newline
234234
*/
235-
if (m->protocol == SYSLOG_TRANSMISSION_PROTOCOL_TCP)
235+
if (m->protocol == SYSLOG_TRANSMISSION_PROTOCOL_TCP || m->protocol == SYSLOG_TRANSMISSION_PROTOCOL_TLS)
236236
IOVEC_SET_STRING(iov[n++], "\n");
237237

238238
return protocol_send(m, iov, n);

0 commit comments

Comments
 (0)