FS-9775: Added salloc calls for other entities

The use of salloc in the main ks_dht_t for the inner nodeid suggests salloc calls
should be renamed prealloc to avoid confusion where not used on stack variables
This commit is contained in:
Shane Bryldt authored and Mike Jerris committed 2017-01-25 14:59:33 -06:00
1 parent 63d0d8dc4a
commit b331b72ebe
5 files changed
+35 -1

No files matched your search

+15 -1
View File
@@ -17,6 +17,19 @@ KS_DECLARE(ks_status_t) ks_dht2_endpoint_alloc(ks_dht2_endpoint_t **endpoint, ks
return KS_STATUS_SUCCESS;
}
/**
*
*/
KS_DECLARE(ks_status_t) ks_dht2_endpoint_salloc(ks_dht2_endpoint_t *endpoint, ks_pool_t *pool)
{
ks_assert(endpoint);
ks_assert(pool);
endpoint->pool = pool;
return KS_STATUS_SUCCESS;
}
/**
*
*/
@@ -28,7 +41,7 @@ KS_DECLARE(ks_status_t) ks_dht2_endpoint_free(ks_dht2_endpoint_t *endpoint)
return KS_STATUS_SUCCESS;
}
/**
*
@@ -36,6 +49,7 @@ KS_DECLARE(ks_status_t) ks_dht2_endpoint_free(ks_dht2_endpoint_t *endpoint)
KS_DECLARE(ks_status_t) ks_dht2_endpoint_init(ks_dht2_endpoint_t *endpoint, const ks_sockaddr_t *addr, ks_socket_t sock)
{
ks_assert(endpoint);
ks_assert(endpoint->pool);
ks_assert(addr);
ks_assert(addr->family == AF_INET || addr->family == AF_INET6);