FS-10167: Bug fixes, memory leaks, etc

This commit is contained in:
Shane Bryldt committed 2017-07-03 13:45:29 -06:00
1 parent f9d23ccadd
commit 2ff3ce1a5c
4 files changed
+15 -6

No files matched your search

+7 -2
View File
@@ -292,14 +292,19 @@ int main(int argc, char **argv)
if (autoconnect) {
blade_connection_t *bc = NULL;
blade_identity_t *target = NULL;
ks_bool_t connected = KS_FALSE;
blade_identity_create(&target, blade_handle_pool_get(bh));
if (blade_identity_parse(target, autoconnect) == KS_STATUS_SUCCESS) blade_handle_connect(bh, &bc, target, NULL);
if (blade_identity_parse(target, autoconnect) == KS_STATUS_SUCCESS) connected = blade_handle_connect(bh, &bc, target, NULL) == KS_STATUS_SUCCESS;
blade_identity_destroy(&target);
ks_sleep_ms(3000);
if (connected) {
// @todo use session state change callback to know when the session is ready and the realm(s) available from blade.connect
ks_sleep_ms(3000);
}
}
loop(bh);
+5 -2
View File
@@ -73,14 +73,17 @@ ks_status_t testproto_create(testproto_t **testP, blade_handle_t *bh)
ks_status_t testproto_destroy(testproto_t **testP)
{
testproto_t *test = NULL;
//ks_pool_t *pool = NULL;
ks_pool_t *pool = NULL;
ks_assert(testP);
ks_assert(*testP);
test = *testP;
pool = test->pool;
ks_pool_free(test->pool, testP);
ks_pool_close(&pool);
*testP = NULL;
return KS_STATUS_SUCCESS;
}