X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=apps%2Fsilcd%2Fserverconfig.c;h=b5dbc04ce5a90ba6c885c9202719d725d270f96f;hb=6b90f5d00cab07ca36b107b21cde31ec974aca27;hp=568e19f8e752a9377a34c80eaadd12373ca5d830;hpb=8d5a659e988ef812fd137c774643b9f274a2a0e3;p=silc.git diff --git a/apps/silcd/serverconfig.c b/apps/silcd/serverconfig.c index 568e19f8..b5dbc04c 100644 --- a/apps/silcd/serverconfig.c +++ b/apps/silcd/serverconfig.c @@ -1201,6 +1201,7 @@ SilcServerConfig silc_server_config_alloc(const char *filename) /* alloc a config object */ config_new = silc_calloc(1, sizeof(*config_new)); + config_new->refcount = 1; if (!config_new) return NULL; @@ -1257,7 +1258,6 @@ SilcServerConfig silc_server_config_alloc(const char *filename) /* Set default to configuration parameters */ silc_server_config_set_defaults(config_new); - config_new->refcount = 1; return config_new; } @@ -1270,7 +1270,7 @@ void silc_server_config_ref(SilcServerConfigRef *ref, SilcServerConfig config, config->refcount++; ref->config = config; ref->ref_ptr = ref_ptr; - SILC_LOG_DEBUG(("Referencing config [%p] refcnt %hu->%hu", config, + SILC_LOG_DEBUG(("Referencing config [%p] refcnt %d->%d", config, config->refcount - 1, config->refcount)); } } @@ -1291,7 +1291,7 @@ void silc_server_config_destroy(SilcServerConfig config) void *tmp; config->refcount--; - SILC_LOG_DEBUG(("Unreferencing config [%p] refcnt %hu->%hu", config, + SILC_LOG_DEBUG(("Unreferencing config [%p] refcnt %d->%d", config, config->refcount + 1, config->refcount)); if (config->refcount > 0) return;