[fix] free the right memory when avahi service disapeares, close #25
This commit is contained in:
@@ -156,7 +156,7 @@ client_callback (AvahiClient *c,
|
||||
fprintf(stderr,
|
||||
"Server connection failure: %s\n",
|
||||
avahi_strerror(avahi_client_errno(c)));
|
||||
teleport_browser_avahi_shutdown();
|
||||
avahi_client_free(client);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -174,8 +174,8 @@ static void client_callback(AvahiClient *c, AvahiClientState state, AVAHI_GCC_UN
|
||||
case AVAHI_CLIENT_FAILURE:
|
||||
|
||||
fprintf(stderr, "Client failure: %s\n", avahi_strerror(avahi_client_errno(c)));
|
||||
//avahi_simple_poll_quit(simple_poll);
|
||||
teleport_publish_shutdown();
|
||||
avahi_client_free(client);
|
||||
avahi_free(name);
|
||||
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user