projects
/
feisty_meow.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
new fortune.
[feisty_meow.git]
/
octopi
/
library
/
octopus
/
entity_data_bin.cpp
diff --git
a/octopi/library/octopus/entity_data_bin.cpp
b/octopi/library/octopus/entity_data_bin.cpp
index 080e758c3e312a6a905dc0d850cdaea7cb8dcb2e..fd877d7bb67d64c7505bb08d0bd36f34d2adc92a 100644
(file)
--- a/
octopi/library/octopus/entity_data_bin.cpp
+++ b/
octopi/library/octopus/entity_data_bin.cpp
@@
-189,7
+189,7
@@
bool scramble_applier(const octopus_entity &formal(key), entity_basket &bask,
{
#undef static_class_name
#define static_class_name() "entity_data_bin"
{
#undef static_class_name
#define static_class_name() "entity_data_bin"
-
//
FUNCDEF("scramble_applier");
+ FUNCDEF("scramble_applier");
int *county = (int *)data_link;
*county += bask.elements();
return true;
int *county = (int *)data_link;
*county += bask.elements();
return true;
@@
-219,7
+219,7
@@
int entity_data_bin::scramble_counter()
bool entity_data_bin::add_item(infoton *to_add,
const octopus_request_id &orig_id)
{
bool entity_data_bin::add_item(infoton *to_add,
const octopus_request_id &orig_id)
{
-
//
FUNCDEF("add_item");
+ FUNCDEF("add_item");
GRAB_LOCK;
// create a record to add to the appropriate bin.
infoton_holder *holder = new infoton_holder(orig_id, to_add);
GRAB_LOCK;
// create a record to add to the appropriate bin.
infoton_holder *holder = new infoton_holder(orig_id, to_add);
@@
-241,6
+241,7
@@
bool entity_data_bin::add_item(infoton *to_add,
if (current_size + to_add->packed_size() > _max_per_ent) {
WHACK(holder);
if (current_size + to_add->packed_size() > _max_per_ent) {
WHACK(holder);
+LOG(astring("size limit would be exceeded if we stored this product"));
return false;
}
return false;
}
@@
-253,10
+254,8
@@
bool entity_data_bin::add_item(infoton *to_add,
bool any_item_applier(const octopus_entity &formal(key), entity_basket &bask,
void *data_link)
{
bool any_item_applier(const octopus_entity &formal(key), entity_basket &bask,
void *data_link)
{
-//#ifdef DEBUG_ENTITY_DATA_BIN
-// #define static_class_name() "entity_data_bin"
-// FUNCDEF("any_item_applier");
-//#endif
+ #define static_class_name() "entity_data_bin"
+ FUNCDEF("any_item_applier");
apply_struct *apple = (apply_struct *)data_link;
// check the basket to see if it has any items.
if (!bask.elements()) {
apply_struct *apple = (apply_struct *)data_link;
// check the basket to see if it has any items.
if (!bask.elements()) {
@@
-304,7
+303,7
@@
infoton *entity_data_bin::acquire_for_any(octopus_request_id &id)
int entity_data_bin::acquire_for_entity(const octopus_entity &requester,
infoton_list &items, int maximum_size)
{
int entity_data_bin::acquire_for_entity(const octopus_entity &requester,
infoton_list &items, int maximum_size)
{
-
//
FUNCDEF("acquire_for_entity [multiple]");
+ FUNCDEF("acquire_for_entity [multiple]");
// this method does not grab the lock because it simply composes other
// class methods without interacting with class data members.
items.reset();
// this method does not grab the lock because it simply composes other
// class methods without interacting with class data members.
items.reset();
@@
-473,7
+472,7
@@
void entity_data_bin::clean_out_deadwood(int decay_interval)
bool entity_data_bin::get_sizes(const octopus_entity &id, int &items,
int &bytes)
{
bool entity_data_bin::get_sizes(const octopus_entity &id, int &items,
int &bytes)
{
-
//
FUNCDEF("get_sizes");
+ FUNCDEF("get_sizes");
items = 0;
bytes = 0;
GRAB_LOCK;
items = 0;
bytes = 0;
GRAB_LOCK;