#include <asm/byteorder.h>
#include <talloc/talloc.h>
-#include <log.h>
+#include <log/log.h>
#include "ui/common/discover-client.h"
#include "pb-protocol/pb-protocol.h"
if (!device)
return;
- client->ops.remove_device(device, client->ops.cb_arg);
-
- talloc_free(device);
-
/* remove the device from the client's device array */
client->n_devices--;
memmove(&client->devices[i], &client->devices[i+1],
client->devices = talloc_realloc(client, client->devices,
struct device *, client->n_devices);
+ /* notify the UI */
+ client->ops.remove_device(device, client->ops.cb_arg);
+
+ talloc_free(device);
}
int discover_client_process(struct discover_client *client)