mirror of
https://github.com/eclipse/mosquitto.git
synced 2025-05-09 01:01:11 +08:00
mosquitto_sub: Fix -E
not working unless -d
was also specified.
Closes #1418. Thanks to Lichard Torman.
This commit is contained in:
parent
83ee01474b
commit
0a8358243b
@ -1,3 +1,7 @@
|
||||
Clients:
|
||||
- mosquitto_sub: Fix `-E` incorrectly not working unless `-d` was also
|
||||
specified. Closes #1418.
|
||||
|
||||
1.6.6 - 20190917
|
||||
================
|
||||
|
||||
|
@ -145,11 +145,13 @@ void my_subscribe_callback(struct mosquitto *mosq, void *obj, int mid, int qos_c
|
||||
|
||||
UNUSED(obj);
|
||||
|
||||
if(!cfg.quiet) printf("Subscribed (mid: %d): %d", mid, granted_qos[0]);
|
||||
for(i=1; i<qos_count; i++){
|
||||
if(!cfg.quiet) printf(", %d", granted_qos[i]);
|
||||
if(cfg.debug){
|
||||
if(!cfg.quiet) printf("Subscribed (mid: %d): %d", mid, granted_qos[0]);
|
||||
for(i=1; i<qos_count; i++){
|
||||
if(!cfg.quiet) printf(", %d", granted_qos[i]);
|
||||
}
|
||||
if(!cfg.quiet) printf("\n");
|
||||
}
|
||||
if(!cfg.quiet) printf("\n");
|
||||
|
||||
if(cfg.exit_after_sub){
|
||||
mosquitto_disconnect_v5(mosq, 0, cfg.disconnect_props);
|
||||
@ -322,8 +324,8 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
if(cfg.debug){
|
||||
mosquitto_log_callback_set(mosq, my_log_callback);
|
||||
mosquitto_subscribe_callback_set(mosq, my_subscribe_callback);
|
||||
}
|
||||
mosquitto_subscribe_callback_set(mosq, my_subscribe_callback);
|
||||
mosquitto_connect_v5_callback_set(mosq, my_connect_callback);
|
||||
mosquitto_message_v5_callback_set(mosq, my_message_callback);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user