GNUNET_assert (NULL != env);
GNUNET_assert(NULL != env->cfg);
- GNUNET_assert(NULL != env->stats);
GNUNET_assert(NULL != env->bandwidth_changed_cb);
GNUNET_assert(NULL != env->get_preferences);
GNUNET_assert(NULL != env->get_property);
- s = GNUNET_malloc (sizeof (struct GAS_PROPORTIONAL_Handle));
+ s = GNUNET_new (struct GAS_PROPORTIONAL_Handle);
s->env = env;
env->sf.s_add = &GAS_proportional_address_add;
env->sf.s_address_update_property = &GAS_proportional_address_property_changed;
"# ATS addresses %s total", cur->desc);
GNUNET_asprintf (&cur->stat_active,
"# ATS active addresses %s total", cur->desc);
- LOG (GNUNET_ERROR_TYPE_INFO, "Added network %u `%s' %p\n", c, cur->desc, s);
+ LOG (GNUNET_ERROR_TYPE_INFO, "Added network %u `%s' (%llu/%llu)\n",
+ c, cur->desc, cur->total_quota_in, cur->total_quota_out);
}
return s;
}
return;
}
- aw = GNUNET_malloc (sizeof (struct AddressWrapper));
+ aw = GNUNET_new (struct AddressWrapper);
aw->addr = address;
GNUNET_CONTAINER_DLL_insert(net->head, net->tail, aw);
addresse_increment (s, net, GNUNET_YES, GNUNET_NO);
- asi = GNUNET_malloc (sizeof (struct AddressSolverInformation));
+ asi = GNUNET_new (struct AddressSolverInformation);
asi->network = net;
asi->calculated_quota_in_NBO = 0;
asi->calculated_quota_out_NBO = 0;