]> sigrok.org Git - libsigrok.git/blobdiff - src/scpi/scpi_tcp.c
spci: Terminate all commands with a linefeed for all transports
[libsigrok.git] / src / scpi / scpi_tcp.c
index 62974680aa93bdc99b321c5daeff5196af842134..e87f5e784fb1d0ab61b0eaac8f44b06091b04076 100644 (file)
@@ -135,12 +135,9 @@ static int scpi_tcp_send(void *priv, const char *command)
 {
        struct scpi_tcp *tcp = priv;
        int len, out;
-       char *terminated_command;
 
-       terminated_command = g_strdup_printf("%s\r\n", command);
-       len = strlen(terminated_command);
-       out = send(tcp->socket, terminated_command, len, 0);
-       g_free(terminated_command);
+       len = strlen(command);
+       out = send(tcp->socket, command, len, 0);
 
        if (out < 0) {
                sr_err("Send error: %s", g_strerror(errno));