servlib/bundling/BundleDaemon.cc
changeset 29 00dfdf113d87
parent 28 406d4f7eb00d
child 38 e51218da06a2
equal deleted inserted replaced
28:406d4f7eb00d 29:00dfdf113d87
   715         
   715         
   716     case EVENTSRC_FRAGMENTATION:
   716     case EVENTSRC_FRAGMENTATION:
   717         stats_.generated_bundles_++;
   717         stats_.generated_bundles_++;
   718         source_str = " (from fragmentation)";
   718         source_str = " (from fragmentation)";
   719 		s10_bundle(S10_OHCRAP,bundle,NULL,0,0,NULL,"__FILE__:__LINE__");
   719 		s10_bundle(S10_OHCRAP,bundle,NULL,0,0,NULL,"__FILE__:__LINE__");
       
   720         log_debug("S10_OHCRAP - eventsrc: %s", source_str);
   720         break;
   721         break;
   721 
   722 
   722     case EVENTSRC_ROUTER:
   723     case EVENTSRC_ROUTER:
   723         stats_.generated_bundles_++;
   724         stats_.generated_bundles_++;
   724         source_str = " (from router)";
   725         source_str = " (from router)";
   725 		s10_bundle(S10_OHCRAP,bundle,NULL,0,0,NULL,"__FILE__:__LINE__");
   726 		s10_bundle(S10_OHCRAP,bundle,NULL,0,0,NULL,"__FILE__:__LINE__");
       
   727         log_debug("S10_OHCRAP - eventsrc: %s", source_str);
   726         break;
   728         break;
   727     
   729     
   728     case EVENTSRC_CACHE:
   730     case EVENTSRC_CACHE:
   729         stats_.generated_bundles_++;
   731         stats_.generated_bundles_++;
   730         source_str = " (from cache)";
   732         source_str = " (from cache)";
   732         s10_bundle(S10_FROMCACHE,bundle,NULL,0,0,NULL,"__FILE__:__LINE__");
   734         s10_bundle(S10_FROMCACHE,bundle,NULL,0,0,NULL,"__FILE__:__LINE__");
   733         break;
   735         break;
   734 
   736 
   735     default:
   737     default:
   736 		s10_bundle(S10_OHCRAP,bundle,NULL,0,0,NULL,"__FILE__:__LINE__");
   738 		s10_bundle(S10_OHCRAP,bundle,NULL,0,0,NULL,"__FILE__:__LINE__");
       
   739         log_debug("S10_OHCRAP - nknown eventsrc: %s", event->source_);
   737         NOTREACHED;
   740         NOTREACHED;
   738     }
   741     }
   739 
   742 
   740     // if debug logging is enabled, dump out a verbose printing of the
   743     // if debug logging is enabled, dump out a verbose printing of the
   741     // bundle, including all options, otherwise, a more terse log
   744     // bundle, including all options, otherwise, a more terse log
   871      * timestamp, and fragmentation information with some other bundle
   874      * timestamp, and fragmentation information with some other bundle
   872      * in the system.
   875      * in the system.
   873      */
   876      */
   874     Bundle* duplicate = find_duplicate(bundle);
   877     Bundle* duplicate = find_duplicate(bundle);
   875     if (duplicate != NULL) {
   878     if (duplicate != NULL) {
   876         log_notice("got duplicate bundle: %s -> %s creation %llu.%llu",
   879         log_notice("got duplicate bundle: %s -> %s creation %llu.%llu frag_offset %llu",
   877                    bundle->source().c_str(),
   880                    bundle->source().c_str(),
   878                    bundle->dest().c_str(),
   881                    bundle->dest().c_str(),
   879                    bundle->creation_ts().seconds_,
   882                    bundle->creation_ts().seconds_,
   880                    bundle->creation_ts().seqno_);
   883                    bundle->creation_ts().seqno_,
       
   884                    bundle->frag_offset());
   881 		s10_bundle(S10_DUP,bundle,NULL,0,0,NULL,"__FILE__:__LINE__");
   885 		s10_bundle(S10_DUP,bundle,NULL,0,0,NULL,"__FILE__:__LINE__");
   882 
   886 
   883         stats_.duplicate_bundles_++;
   887         stats_.duplicate_bundles_++;
   884         
   888         
   885         if (bundle->custody_requested() && duplicate->local_custody())
   889         if (bundle->custody_requested() && duplicate->local_custody())