zeroconf/avahi: move variable declaration into "case"
This commit is contained in:
parent
dd10b2bd61
commit
dad1c21b59
|
@ -157,8 +157,6 @@ MyAvahiClientCallback(AvahiClient *c, AvahiClientState state,
|
||||||
FormatDebug(avahi_domain, "Client changed to state %d", state);
|
FormatDebug(avahi_domain, "Client changed to state %d", state);
|
||||||
|
|
||||||
switch (state) {
|
switch (state) {
|
||||||
int reason;
|
|
||||||
|
|
||||||
case AVAHI_CLIENT_S_RUNNING:
|
case AVAHI_CLIENT_S_RUNNING:
|
||||||
LogDebug(avahi_domain, "Client is RUNNING");
|
LogDebug(avahi_domain, "Client is RUNNING");
|
||||||
|
|
||||||
|
@ -169,8 +167,8 @@ MyAvahiClientCallback(AvahiClient *c, AvahiClientState state,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case AVAHI_CLIENT_FAILURE:
|
case AVAHI_CLIENT_FAILURE:
|
||||||
reason = avahi_client_errno(c);
|
if (int reason = avahi_client_errno(c);
|
||||||
if (reason == AVAHI_ERR_DISCONNECTED) {
|
reason == AVAHI_ERR_DISCONNECTED) {
|
||||||
LogNotice(avahi_domain,
|
LogNotice(avahi_domain,
|
||||||
"Client Disconnected, will reconnect shortly");
|
"Client Disconnected, will reconnect shortly");
|
||||||
if (avahi_group != nullptr) {
|
if (avahi_group != nullptr) {
|
||||||
|
|
Loading…
Reference in New Issue