mirror of
https://github.com/eclipse-mosquitto/mosquitto.git
synced 2026-09-20 14:57:34 +08:00
Fix mosquitto_client_protocol() returning incorrect values.
This commit is contained in:
+8
-1
@@ -65,7 +65,14 @@ void *mosquitto_client_certificate(const struct mosquitto *client)
|
||||
|
||||
int mosquitto_client_protocol(const struct mosquitto *client)
|
||||
{
|
||||
return client->protocol;
|
||||
#ifdef WITH_WEBSOCKETS
|
||||
if(client->wsi){
|
||||
return mp_websockets;
|
||||
}else
|
||||
#endif
|
||||
{
|
||||
return mp_mqtt;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user