/*
* Copyright (c) 2017, Shane Bryldt
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* * Neither the name of the original author; nor the names of any contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
- *
+ *
+ *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
struct blade_identity_s {
const char *uri;
-
+
const char *components;
const char *name;
const char *domain;
KS_DECLARE(ks_status_t) blade_identity_destroy(blade_identity_t **biP)
{
- blade_identity_t *bi = NULL;
-
ks_assert(biP);
ks_assert(*biP);
- bi = *biP;
-
ks_pool_free(biP);
return KS_STATUS_SUCCESS;
char *tmp = NULL;
char *tmp2 = NULL;
ks_pool_t *pool = NULL;
-
+
ks_assert(bi);
ks_assert(uri);
ks_log(KS_LOG_DEBUG, "Parsing URI: %s\n", uri);
-
+
pool = ks_pool_get(bi);
if (bi->uri) {
bi->name = tmp;
if (!(tmp = strchr(tmp, '@'))) return KS_STATUS_FAIL;
*tmp++ = '\0';
-
+
bi->domain = tmp2 = tmp;
if ((tmp = strchr(tmp, '/'))) {
*tmp++ = '\0';
KS_DECLARE(ks_status_t) blade_protocol_destroy(blade_protocol_t **bpP)
{
- blade_protocol_t *bp = NULL;
-
ks_assert(bpP);
ks_assert(*bpP);
- bp = *bpP;
-
ks_pool_free(bpP);
return KS_STATUS_SUCCESS;
KS_DECLARE(ks_status_t) blade_rpc_request_destroy(blade_rpc_request_t **brpcreqP)
{
- blade_rpc_request_t *brpcreq = NULL;
-
ks_assert(brpcreqP);
ks_assert(*brpcreqP);
- brpcreq = *brpcreqP;
-
ks_pool_free(brpcreqP);
return KS_STATUS_SUCCESS;
KS_DECLARE(ks_status_t) blade_rpc_response_destroy(blade_rpc_response_t **brpcresP)
{
- blade_rpc_response_t *brpcres = NULL;
-
ks_assert(brpcresP);
ks_assert(*brpcresP);
- brpcres = *brpcresP;
-
ks_pool_free(brpcresP);
return KS_STATUS_SUCCESS;
/*
* Copyright (c) 2017, Shane Bryldt
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* * Neither the name of the original author; nor the names of any contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
- *
+ *
+ *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
KS_DECLARE(ks_status_t) blade_subscription_destroy(blade_subscription_t **bsubP)
{
- blade_subscription_t *bsub = NULL;
-
ks_assert(bsubP);
ks_assert(*bsubP);
- bsub = *bsubP;
-
ks_pool_free(bsubP);
return KS_STATUS_SUCCESS;