@@ -109,7 +109,7 @@ int main(int argc, char **argv) {
109109 // seed random number generation with something reasonably unique
110110 srand (time (NULL ) ^ getpid ());
111111
112- g_Handler = shared_ptr<scribeHandler>(new scribeHandler (port, config_file));
112+ g_Handler = boost:: shared_ptr<scribeHandler>(new scribeHandler (port, config_file));
113113 g_Handler->initialize ();
114114
115115 scribe::startServer (); // never returns
@@ -242,10 +242,10 @@ bool scribeHandler::createCategoryFromModel(
242242 return false ;
243243 }
244244
245- shared_ptr<StoreQueue> pstore;
245+ boost:: shared_ptr<StoreQueue> pstore;
246246 if (newThreadPerCategory) {
247247 // Create a new thread/StoreQueue for this category
248- pstore = shared_ptr<StoreQueue>(new StoreQueue (model, category));
248+ pstore = boost:: shared_ptr<StoreQueue>(new StoreQueue (model, category));
249249 LOG_OPER (" [%s] Creating new category store from model %s" ,
250250 category.c_str (), model->getCategoryHandled ().c_str ());
251251
@@ -258,10 +258,10 @@ bool scribeHandler::createCategoryFromModel(
258258 category.c_str (), model->getCategoryHandled ().c_str ());
259259 }
260260
261- shared_ptr<store_list_t > pstores;
261+ boost:: shared_ptr<store_list_t > pstores;
262262 category_map_t ::iterator cat_iter = categories.find (category);
263263 if (cat_iter == categories.end ()) {
264- pstores = shared_ptr<store_list_t >(new store_list_t );
264+ pstores = boost:: shared_ptr<store_list_t >(new store_list_t );
265265 categories[category] = pstores;
266266 } else {
267267 pstores = cat_iter->second ;
@@ -292,7 +292,7 @@ bool scribeHandler::throttleRequest(const vector<LogEntry>& messages) {
292292 for (category_map_t ::iterator cat_iter = categories.begin ();
293293 cat_iter != categories.end ();
294294 ++cat_iter) {
295- shared_ptr<store_list_t > pstores = cat_iter->second ;
295+ boost:: shared_ptr<store_list_t > pstores = cat_iter->second ;
296296 if (!pstores) {
297297 throw std::logic_error (" throttle check: iterator in category map holds null pointer" );
298298 }
@@ -318,7 +318,7 @@ bool scribeHandler::throttleRequest(const vector<LogEntry>& messages) {
318318shared_ptr<store_list_t > scribeHandler::createNewCategory (
319319 const string& category) {
320320
321- shared_ptr<store_list_t > store_list;
321+ boost:: shared_ptr<store_list_t > store_list;
322322
323323 // First, check the list of category prefixes for a model
324324 category_map_t ::iterator cat_prefix_iter = category_prefixes.begin ();
@@ -327,7 +327,7 @@ shared_ptr<store_list_t> scribeHandler::createNewCategory(
327327 if (cat_prefix_iter->first .compare (0 , len-1 , category, 0 , len-1 ) == 0 ) {
328328 // Found a matching prefix model
329329
330- shared_ptr<store_list_t > pstores = cat_prefix_iter->second ;
330+ boost:: shared_ptr<store_list_t > pstores = cat_prefix_iter->second ;
331331 for (store_list_t ::iterator store_iter = pstores->begin ();
332332 store_iter != pstores->end (); ++store_iter) {
333333 createCategoryFromModel (category, *store_iter);
@@ -368,7 +368,7 @@ shared_ptr<store_list_t> scribeHandler::createNewCategory(
368368// Add this message to every store in list
369369void scribeHandler::addMessage (
370370 const LogEntry& entry,
371- const shared_ptr<store_list_t >& store_list) {
371+ const boost:: shared_ptr<store_list_t >& store_list) {
372372
373373 int numstores = 0 ;
374374
@@ -416,7 +416,7 @@ ResultCode scribeHandler::Log(const vector<LogEntry>& messages) {
416416 continue ;
417417 }
418418
419- shared_ptr<store_list_t > store_list;
419+ boost:: shared_ptr<store_list_t > store_list;
420420 string category = (*msg_iter).category ;
421421
422422 category_map_t ::iterator cat_iter;
@@ -496,7 +496,7 @@ bool scribeHandler::throttleDeny(int num_messages) {
496496
497497void scribeHandler::stopStores () {
498498 setStatus (STOPPING);
499- shared_ptr<store_list_t > store_list;
499+ boost:: shared_ptr<store_list_t > store_list;
500500 for (store_list_t ::iterator store_iter = defaultStores.begin ();
501501 store_iter != defaultStores.end (); ++store_iter) {
502502 if (!(*store_iter)->isModelStore ()) {
@@ -652,9 +652,9 @@ void scribeHandler::initialize() {
652652// Configures the store specified by the store configuration. Returns false if failed.
653653bool scribeHandler::configureStore (pStoreConf store_conf, int *numstores) {
654654 string category;
655- shared_ptr<StoreQueue> pstore;
655+ boost:: shared_ptr<StoreQueue> pstore;
656656 vector<string> category_list;
657- shared_ptr<StoreQueue> model;
657+ boost:: shared_ptr<StoreQueue> model;
658658 bool single_category = true ;
659659
660660
@@ -685,7 +685,7 @@ bool scribeHandler::configureStore(pStoreConf store_conf, int *numstores) {
685685 }
686686 else if (single_category) {
687687 // configure single store
688- shared_ptr<StoreQueue> result =
688+ boost:: shared_ptr<StoreQueue> result =
689689 configureStoreCategory (store_conf, category_list[0 ], model);
690690
691691 if (result == NULL ) {
@@ -718,7 +718,7 @@ bool scribeHandler::configureStore(pStoreConf store_conf, int *numstores) {
718718 // create a store for each category
719719 vector<string>::iterator iter;
720720 for (iter = category_list.begin (); iter < category_list.end (); iter++) {
721- shared_ptr<StoreQueue> result =
721+ boost:: shared_ptr<StoreQueue> result =
722722 configureStoreCategory (store_conf, *iter, model);
723723
724724 if (!result) {
@@ -745,7 +745,7 @@ shared_ptr<StoreQueue> scribeHandler::configureStoreCategory(
745745
746746 if (category.empty ()) {
747747 setStatusDetails (" Bad config - store with blank category" );
748- return shared_ptr<StoreQueue>();
748+ return boost:: shared_ptr<StoreQueue>();
749749 }
750750
751751 LOG_OPER (" CATEGORY : %s" , category.c_str ());
@@ -763,17 +763,17 @@ shared_ptr<StoreQueue> scribeHandler::configureStoreCategory(
763763 string errormsg (" Bad config - no type for store with category: " );
764764 errormsg += category;
765765 setStatusDetails (errormsg);
766- return shared_ptr<StoreQueue>();
766+ return boost:: shared_ptr<StoreQueue>();
767767 }
768768
769769 // look for the store in the current list
770- shared_ptr<StoreQueue> pstore;
770+ boost:: shared_ptr<StoreQueue> pstore;
771771
772772 try {
773773 if (model != NULL ) {
774774 // Create a copy of the model if we want a new thread per category
775775 if (newThreadPerCategory && !is_default && !is_prefix_category) {
776- pstore = shared_ptr<StoreQueue>(new StoreQueue (model, category));
776+ pstore = boost:: shared_ptr<StoreQueue>(new StoreQueue (model, category));
777777 } else {
778778 pstore = model;
779779 already_created = true ;
@@ -798,7 +798,7 @@ shared_ptr<StoreQueue> scribeHandler::configureStoreCategory(
798798 is_model = newThreadPerCategory && categories;
799799
800800 pstore =
801- shared_ptr<StoreQueue>(new StoreQueue (type, store_name, checkPeriod,
801+ boost:: shared_ptr<StoreQueue>(new StoreQueue (type, store_name, checkPeriod,
802802 is_model, multi_category));
803803 }
804804 } catch (...) {
@@ -809,7 +809,7 @@ shared_ptr<StoreQueue> scribeHandler::configureStoreCategory(
809809 string errormsg (" Bad config - can't create a store of type: " );
810810 errormsg += type;
811811 setStatusDetails (errormsg);
812- return shared_ptr<StoreQueue>();
812+ return boost:: shared_ptr<StoreQueue>();
813813 }
814814
815815 // open store. and configure it if not copied from a model
@@ -826,23 +826,23 @@ shared_ptr<StoreQueue> scribeHandler::configureStoreCategory(
826826 LOG_OPER (" Creating default store" );
827827 defaultStores.push_back (pstore);
828828 } else if (is_prefix_category) {
829- shared_ptr<store_list_t > pstores;
829+ boost:: shared_ptr<store_list_t > pstores;
830830 category_map_t ::iterator category_iter = category_prefixes.find (category);
831831 if (category_iter != category_prefixes.end ()) {
832832 pstores = category_iter->second ;
833833 } else {
834- pstores = shared_ptr<store_list_t >(new store_list_t );
834+ pstores = boost:: shared_ptr<store_list_t >(new store_list_t );
835835 category_prefixes[category] = pstores;
836836 }
837837 pstores->push_back (pstore);
838838 } else if (!pstore->isModelStore ()) {
839839 // push the new store onto the new map if it's not just a model
840- shared_ptr<store_list_t > pstores;
840+ boost:: shared_ptr<store_list_t > pstores;
841841 category_map_t ::iterator category_iter = categories.find (category);
842842 if (category_iter != categories.end ()) {
843843 pstores = category_iter->second ;
844844 } else {
845- pstores = shared_ptr<store_list_t >(new store_list_t );
845+ pstores = boost:: shared_ptr<store_list_t >(new store_list_t );
846846 categories[category] = pstores;
847847 }
848848 pstores->push_back (pstore);
@@ -857,7 +857,7 @@ void scribeHandler::deleteCategoryMap(category_map_t& cats) {
857857 for (category_map_t ::iterator cat_iter = cats.begin ();
858858 cat_iter != cats.end ();
859859 ++cat_iter) {
860- shared_ptr<store_list_t > pstores = cat_iter->second ;
860+ boost:: shared_ptr<store_list_t > pstores = cat_iter->second ;
861861 if (!pstores) {
862862 throw std::logic_error (" deleteCategoryMap: "
863863 " iterator in category map holds null pointer" );
0 commit comments