]> sigrok.org Git - libsigrok.git/commit - src/log.c
Logging: Filter out unwanted newlines
authorSoeren Apel <redacted>
Thu, 9 Jun 2016 02:36:35 +0000 (04:36 +0200)
committerUwe Hermann <redacted>
Sun, 26 Jun 2016 16:57:24 +0000 (18:57 +0200)
commit4d6d660b8306abdbc77a47e48d7f527234ce9a4f
treee010acd8e5523e6f052c0b17f90ffc62499b31b3
parente264ebded832bc6556f88f771e9598d998aac6ce
Logging: Filter out unwanted newlines

055804e89ea0f6b4145040a0eeb2f4e6951692fe changed the outgoing
SCPI message termination by always adding a newline. This results
in the following log output:

sr: [00:00.003102] scpi: Opening VXI device vxi/192.168.178.43.
sr: [00:00.005648] scpi_vxi: Successfully sent SCPI command: '*IDN?
'.
sr: [00:00.005931] scpi: Got response: 'YOKOGAWA,710130,91HC30402,F3.73', length 31.

This patch restores the previous unterminated SCPI message logging:

sr: [00:00.005462] scpi: Opening VXI device vxi/192.168.178.43.
sr: [00:00.007515] scpi_vxi: Successfully sent SCPI command: '*IDN?'.
sr: [00:00.007860] scpi: Got response: 'YOKOGAWA,710130,91HC30402,F3.73', length 31.

As it's located in the general logging mechanism, we deal with any
additional (and unwanted) newlines this way.
src/log.c