Fix description of -e and -t arguments in mosquitto_rr.

Closes #1881. Thanks to Arnav Singh.
This commit is contained in:
Roger A. Light 2020-11-07 23:11:55 +00:00
parent 90ce92144c
commit a0c39b193b
3 changed files with 20 additions and 8 deletions

View File

@ -128,6 +128,7 @@ Clients:
- mosquitto_sub now supports extra format specifiers for field width and - mosquitto_sub now supports extra format specifiers for field width and
precision for some parameters. precision for some parameters.
- Add `--version` for all clients. - Add `--version` for all clients.
- Fix description of `-e` and `-t` arguments in mosquitto_rr. Closes #1881.
1.6.12 - 2020-08-19 1.6.12 - 2020-08-19

View File

@ -70,7 +70,11 @@ void my_signal_handler(int signum)
int my_publish(struct mosquitto *mosq, int *mid, const char *topic, int payloadlen, void *payload, int qos, bool retain) int my_publish(struct mosquitto *mosq, int *mid, const char *topic, int payloadlen, void *payload, int qos, bool retain)
{ {
return mosquitto_publish_v5(mosq, mid, topic, payloadlen, payload, qos, retain, cfg.publish_props); if(cfg.protocol_version < MQTT_PROTOCOL_V5){
return mosquitto_publish_v5(mosq, mid, topic, payloadlen, payload, qos, retain, NULL);
}else{
return mosquitto_publish_v5(mosq, mid, topic, payloadlen, payload, qos, retain, cfg.publish_props);
}
} }
@ -209,6 +213,7 @@ void print_usage(void)
printf(" argument.\n"); printf(" argument.\n");
printf(" -d : enable debug messages.\n"); printf(" -d : enable debug messages.\n");
printf(" -D : Define MQTT v5 properties. See the documentation for more details.\n"); printf(" -D : Define MQTT v5 properties. See the documentation for more details.\n");
printf(" -e : Response topic. The client will subscribe to this topic to wait for a response.\n");
printf(" -F : output format.\n"); printf(" -F : output format.\n");
printf(" -h : mqtt host to connect to. Defaults to localhost.\n"); printf(" -h : mqtt host to connect to. Defaults to localhost.\n");
printf(" -i : id to use for this client. Defaults to mosquitto_rr_ appended with the process id.\n"); printf(" -i : id to use for this client. Defaults to mosquitto_rr_ appended with the process id.\n");
@ -223,7 +228,7 @@ void print_usage(void)
#ifdef WITH_SRV #ifdef WITH_SRV
printf(" -S : use SRV lookups to determine which host to connect to.\n"); printf(" -S : use SRV lookups to determine which host to connect to.\n");
#endif #endif
printf(" -t : mqtt response topic to subscribe to. May be repeated multiple times.\n"); printf(" -t : topic where the request message will be sent.\n");
printf(" -u : provide a username\n"); printf(" -u : provide a username\n");
printf(" -v : print received messages verbosely.\n"); printf(" -v : print received messages verbosely.\n");
printf(" -V : specify the version of the MQTT protocol to use when connecting.\n"); printf(" -V : specify the version of the MQTT protocol to use when connecting.\n");

View File

@ -17,6 +17,7 @@
<refsynopsisdiv> <refsynopsisdiv>
<cmdsynopsis> <cmdsynopsis>
<command>mosquitto_rr</command> <command>mosquitto_rr</command>
<arg choice='plain'><option>-e</option> <replaceable>response-topic</replaceable></arg>
<group choice='req'> <group choice='req'>
<arg choice='plain'> <arg choice='plain'>
<arg><option>-h</option> <replaceable>hostname</replaceable></arg> <arg><option>-h</option> <replaceable>hostname</replaceable></arg>
@ -30,7 +31,6 @@
<arg choice='plain'><option>-L</option> <replaceable>URL</replaceable></arg> <arg choice='plain'><option>-L</option> <replaceable>URL</replaceable></arg>
<arg choice='opt' rep='repeat'><option>-t</option> <replaceable>message-topic</replaceable></arg> <arg choice='opt' rep='repeat'><option>-t</option> <replaceable>message-topic</replaceable></arg>
</arg> </arg>
<arg><option>-e</option> <replaceable>response-topic</replaceable></arg>
</group> </group>
<group choice='req'> <group choice='req'>
<arg choice='plain'><option>-f</option> <replaceable>file</replaceable></arg> <arg choice='plain'><option>-f</option> <replaceable>file</replaceable></arg>
@ -106,6 +106,10 @@
response. When using MQTT v5, which is the default, response. When using MQTT v5, which is the default,
<command>mosquitto_rr</command> will use the Request-Response <command>mosquitto_rr</command> will use the Request-Response
feature.</para> feature.</para>
<para>The important options are <option>-t</option>, <option>-e</option>,
and one of <option>-f</option>, <option>-m</option>, <option>-n</option>,
and <option>-s</option>.</para>
<para>Example: <code>mosquitto_rr -t request-topic -e response-topic -m message</code></para>
</refsect1> </refsect1>
<refsect1> <refsect1>
@ -246,6 +250,12 @@
the pair.</para> the pair.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><option>-e</option></term>
<listitem>
<para>Response topic. The client will subscribe to this topic to wait for a response.</para>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><option>-f</option></term> <term><option>-f</option></term>
<term><option>--file</option></term> <term><option>--file</option></term>
@ -521,11 +531,7 @@
<term><option>-t</option></term> <term><option>-t</option></term>
<term><option>--topic</option></term> <term><option>--topic</option></term>
<listitem> <listitem>
<para>The MQTT topic to subscribe to, where responses will <para>The MQTT topic where the request message will be sent.</para>
be waited for. See
<citerefentry><refentrytitle>mqtt</refentrytitle><manvolnum>7</manvolnum></citerefentry>
for more information on MQTT topics.</para>
<para>This option may be repeated to subscribe to multiple topics.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>