mirror of
https://github.com/eclipse-mosquitto/mosquitto.git
synced 2026-09-28 16:14:35 +08:00
[483979] Fix "mosquitto_pub -l" stripping the final character on a line.
Thanks to Allan Kobelansky. Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=483979
This commit is contained in:
+4
-1
@@ -3,8 +3,11 @@
|
||||
|
||||
Client library:
|
||||
- Fix _mosquitto_socketpair() on Windows, reducing the chance of delays when
|
||||
publishing. Closes #484693.
|
||||
publishing. Closes #483979.
|
||||
|
||||
Clients:
|
||||
- Fix "mosquitto_pub -l" stripping the final character on a line. Closes
|
||||
#483981.
|
||||
|
||||
1.4.5 - 20151108
|
||||
================
|
||||
|
||||
+1
-1
@@ -392,7 +392,7 @@ int main(int argc, char *argv[])
|
||||
buf_len_actual = strlen(buf);
|
||||
if(buf[buf_len_actual-1] == '\n'){
|
||||
buf[buf_len_actual-1] = '\0';
|
||||
rc2 = mosquitto_publish(mosq, &mid_sent, topic, buf_len_actual, buf, qos, retain);
|
||||
rc2 = mosquitto_publish(mosq, &mid_sent, topic, buf_len_actual-1, buf, qos, retain);
|
||||
if(rc2){
|
||||
if(!quiet) fprintf(stderr, "Error: Publish returned %d, disconnecting.\n", rc2);
|
||||
mosquitto_disconnect(mosq);
|
||||
|
||||
Reference in New Issue
Block a user