}
#endif
+
+static uint32_t get_next_handle(client_t *client)
+{
+ uint32_t retval = client->current_handle;
+
+ client->current_handle++;
+
+ if (client->current_handle == ASM_SERVER_HANDLE_MAX)
+ client->current_handle = 1;
+
+ return retval;
+}
+
+
static void htbl_free_client_class(void *key, void *object)
{
client_class_t *client_class = (client_class_t *) object;
goto error;
}
- handle = client->current_handle++;
+ handle = get_next_handle(client);
d = (resource_set_data_t *) mrp_allocz(sizeof(resource_set_data_t));
if (!d)