log-courier 2.7.1 → 2.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a3ef8d232349a4aeaabfab1481b1675ccd57fa9e10b965d87d7824c23d6f7791
4
- data.tar.gz: 64942e87ac4da08392b7f48bdf0170914617696bebf41a3cb21a87596f8506b8
3
+ metadata.gz: c318bee7d97ff215d852e8980301665d48d8b81a17f6806e2ecbaaa596d9e43f
4
+ data.tar.gz: ad52cced8f9dad919a2521395db9fb442bb0535fed9b54ac555f9c140e70f917
5
5
  SHA512:
6
- metadata.gz: e38df8efda4dcf97cac9bfee072c2c8dc46a4af6a4ee09233c0cc5562b3ee389f8e99b9ecbbdf3347f42bd498c44bf649ddfb86676ddd5e1ebd4db0cf4be1a94
7
- data.tar.gz: fef73ad4bbc70488a2d6dbed07ae5c0ba3ec89c42806fa836ab25781ea995e5fd2783dbaf1b0f483a6c528da0f2f8e0dd2c3fd97668e94dd6827d1f128de3f8e
6
+ metadata.gz: 200421b7dae625c4cdd88bc08197a32db9f50248a2e661af785ebae47d84fdacde97413d8c67189fa3047c2611786e0a3fdc28d56547cc87c047c4e644f38cea
7
+ data.tar.gz: 9ca5c1ef8145659c92a17d9ff0671ac2cc14900ef8d0a052f330055c1c4c55595065a37e0be045642fcd061c029206302f716df2e48012584720fd3622abac60
@@ -125,7 +125,7 @@ module LogCourier
125
125
  def handshake(io_control)
126
126
  return true if @options[:disable_handshake]
127
127
 
128
- @socket.write ['HELO', 8, 0, 2, 7, 0, 'RYLC'].pack('A4NCCCCA4')
128
+ @socket.write ['HELO', 20, 0, 2, 7, 2, 'RYLC'].pack('A4NNNNNA4')
129
129
 
130
130
  signature, data = receive
131
131
  if signature != 'VERS'
@@ -22,9 +22,9 @@ module LogCourier
22
22
  # Protocol
23
23
  module Protocol
24
24
  def self.parse_helo_vers(data)
25
- data = "\x00\x00\x00\x00\x00\x00\x00\x00" if data.length < 8
25
+ data = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" if data.length < 8
26
26
 
27
- flags, major_version, minor_version, patch_version, client = data.unpack('CCCCA4')
27
+ flags, major_version, minor_version, patch_version, client = data.unpack('NNNNA4')
28
28
  client = case client
29
29
  when 'LCOR'
30
30
  'Log Courier'
@@ -368,15 +368,15 @@ module LogCourier
368
368
  @helo = Protocol.parse_helo_vers(data)
369
369
  @logger&.info 'Remote identified', peer: @peer, client_version: @helo[:client_version]
370
370
 
371
- # Flags 1 byte - EVNT flag = 0
371
+ # Flags 4 bytes - EVNT flag = 0
372
372
  # (Significant rewrite would be required to support streaming messages as currently we read
373
373
  # first and then yield for processing. To support EVNT we have to move protocol parsing to
374
374
  # the connection layer here so we can keep reading until we reach the end of the stream)
375
- # Major Version 1 byte
376
- # Minor Version 1 byte
377
- # Patch Version 1 byte
375
+ # Major Version 4 bytes
376
+ # Minor Version 4 bytes
377
+ # Patch Version 4 bytes
378
378
  # Client String 4 bytes
379
- data = [1, 2, 7, 0, 'RYLC'].pack('CCCCA4')
379
+ data = [0, 2, 7, 2, 'RYLC'].pack('NNNNA4')
380
380
  send 'VERS', data
381
381
  end
382
382
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: log-courier
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.7.1
4
+ version: 2.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Woods