diff options
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/IceGrid/AdminSessionI.cpp | 10 | ||||
-rw-r--r-- | cpp/src/IceGrid/AdminSessionI.h | 2 | ||||
-rw-r--r-- | cpp/src/IceGrid/Client.cpp | 3 | ||||
-rw-r--r-- | cpp/src/IceGrid/Database.cpp | 1 | ||||
-rw-r--r-- | cpp/src/IceGrid/FileCache.cpp | 6 | ||||
-rw-r--r-- | cpp/src/IceGrid/FileCache.h | 2 | ||||
-rw-r--r-- | cpp/src/IceGrid/Grammar.cpp | 27 | ||||
-rw-r--r-- | cpp/src/IceGrid/NodeCache.cpp | 28 | ||||
-rw-r--r-- | cpp/src/IceGrid/Parser.cpp | 2 | ||||
-rw-r--r-- | cpp/src/IceGrid/RegistryI.h | 2 | ||||
-rw-r--r-- | cpp/src/IceGrid/Scanner.cpp | 45 | ||||
-rw-r--r-- | cpp/src/IceGrid/Util.cpp | 12 | ||||
-rw-r--r-- | cpp/src/IceStorm/IceStormDB.cpp | 7 | ||||
-rw-r--r-- | cpp/src/IceStorm/Subscriber.cpp | 8 |
14 files changed, 71 insertions, 84 deletions
diff --git a/cpp/src/IceGrid/AdminSessionI.cpp b/cpp/src/IceGrid/AdminSessionI.cpp index 4120f274f28..ac00aaffb56 100644 --- a/cpp/src/IceGrid/AdminSessionI.cpp +++ b/cpp/src/IceGrid/AdminSessionI.cpp @@ -53,12 +53,12 @@ FileIteratorI::FileIteratorI(const shared_ptr<AdminSessionI>& session, const shared_ptr<FileReaderPrx>& reader, const string& filename, long long offset, - int messageMaxSize) : + int messageSizeMax) : _session(session), _reader(reader), _filename(filename), _offset(offset), - _messageMaxSize(messageMaxSize - 256) // Room for the header + _messageSizeMax(messageSizeMax - 256) // Room for the header { } @@ -67,7 +67,7 @@ FileIteratorI::read(int size, Ice::StringSeq& lines, const Ice::Current&) { try { - return _reader->read(_filename, _offset, size > _messageMaxSize ? _messageMaxSize : size, _offset, lines); + return _reader->read(_filename, _offset, size > _messageSizeMax ? _messageSizeMax : size, _offset, lines); } catch(const std::exception& ex) { @@ -414,10 +414,10 @@ AdminSessionI::addFileIterator(const shared_ptr<FileReaderPrx>& reader, const st } auto properties = reader->ice_getCommunicator()->getProperties(); - int messageMaxSize = properties->getPropertyAsIntWithDefault("Ice.MessageMaxSize", 1024) * 1024; + int messageSizeMax = properties->getPropertyAsIntWithDefault("Ice.MessageSizeMax", 1024) * 1024; auto self = static_pointer_cast<AdminSessionI>(shared_from_this()); - auto obj = _servantManager->add(make_shared<FileIteratorI>(self, reader, filename, offset, messageMaxSize), self); + auto obj = _servantManager->add(make_shared<FileIteratorI>(self, reader, filename, offset, messageSizeMax), self); return Ice::uncheckedCast<FileIteratorPrx>(obj); } diff --git a/cpp/src/IceGrid/AdminSessionI.h b/cpp/src/IceGrid/AdminSessionI.h index 8ed7ab9e5b8..c910882cdaf 100644 --- a/cpp/src/IceGrid/AdminSessionI.h +++ b/cpp/src/IceGrid/AdminSessionI.h @@ -142,7 +142,7 @@ private: const std::shared_ptr<FileReaderPrx> _reader; const std::string _filename; long long _offset; - const int _messageMaxSize; + const int _messageSizeMax; }; }; diff --git a/cpp/src/IceGrid/Client.cpp b/cpp/src/IceGrid/Client.cpp index 555e0ee7e4a..5976483b593 100644 --- a/cpp/src/IceGrid/Client.cpp +++ b/cpp/src/IceGrid/Client.cpp @@ -93,8 +93,7 @@ main(int argc, char* argv[]) { IceUtil::CtrlCHandler ctrlCHandler; auto defaultProps = Ice::createProperties(); - defaultProps->setProperty("IceGridAdmin.Server.Endpoints", "tcp -h 127.0.0.1"); - defaultProps->setProperty("IceGridAdmin.Server.ServerName", "127.0.0.1"); + defaultProps->setProperty("IceGridAdmin.Server.Endpoints", "tcp -h localhost"); Ice::InitializationData id; id.properties = createProperties(args, defaultProps); id.properties->setProperty("Ice.Warn.Endpoints", "0"); diff --git a/cpp/src/IceGrid/Database.cpp b/cpp/src/IceGrid/Database.cpp index 697e7fd8e70..cb16587a04b 100644 --- a/cpp/src/IceGrid/Database.cpp +++ b/cpp/src/IceGrid/Database.cpp @@ -4,6 +4,7 @@ #include <IceUtil/StringUtil.h> #include <IceUtil/Random.h> +#include <IceUtil/Functional.h> #include <Ice/LoggerUtil.h> #include <Ice/Communicator.h> #include <Ice/ObjectAdapter.h> diff --git a/cpp/src/IceGrid/FileCache.cpp b/cpp/src/IceGrid/FileCache.cpp index ba06b25d61d..2e8cde52961 100644 --- a/cpp/src/IceGrid/FileCache.cpp +++ b/cpp/src/IceGrid/FileCache.cpp @@ -17,7 +17,7 @@ using namespace std; using namespace IceGrid; FileCache::FileCache(const shared_ptr<Ice::Communicator>& com) : - _messageMaxSize(com->getProperties()->getPropertyAsIntWithDefault("Ice.MessageMaxSize", 1024) * 1024 - 256) + _messageSizeMax(com->getProperties()->getPropertyAsIntWithDefault("Ice.MessageSizeMax", 1024) * 1024 - 256) { } @@ -126,9 +126,9 @@ FileCache::read(const string& file, long long offset, int size, long long& newOf { assert(size > 0); - if(size > _messageMaxSize) + if(size > _messageSizeMax) { - size = _messageMaxSize; + size = _messageSizeMax; } if(size <= 5) diff --git a/cpp/src/IceGrid/FileCache.h b/cpp/src/IceGrid/FileCache.h index 3a40feac689..a6a6b441918 100644 --- a/cpp/src/IceGrid/FileCache.h +++ b/cpp/src/IceGrid/FileCache.h @@ -22,7 +22,7 @@ public: private: - const int _messageMaxSize; + const int _messageSizeMax; }; }; diff --git a/cpp/src/IceGrid/Grammar.cpp b/cpp/src/IceGrid/Grammar.cpp index 13023be904c..e0c8e739d74 100644 --- a/cpp/src/IceGrid/Grammar.cpp +++ b/cpp/src/IceGrid/Grammar.cpp @@ -1802,7 +1802,6 @@ yysyntax_error (char *yyresult, int yystate, int yychar) } } #endif /* YYERROR_VERBOSE */ - /*-----------------------------------------------. | Release the memory associated to this symbol. | @@ -1834,29 +1833,6 @@ yydestruct (yymsg, yytype, yyvaluep) break; } } - - -/* Prevent warnings from -Wmissing-prototypes. */ - -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int yyparse (void *YYPARSE_PARAM); -#else -int yyparse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus -int yyparse (void); -#else -int yyparse (); -#endif -#endif /* ! YYPARSE_PARAM */ - - - default: - break; - } -} /* Prevent warnings from -Wmissing-prototypes. */ @@ -1994,7 +1970,6 @@ int yynerrs; YYSTYPE *yyvs1 = yyvs; yytype_int16 *yyss1 = yyss; - /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might @@ -2038,7 +2013,6 @@ int yynerrs; yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; - YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); @@ -3309,7 +3283,6 @@ yyreduce: *++yyvsp = yyval; - /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ diff --git a/cpp/src/IceGrid/NodeCache.cpp b/cpp/src/IceGrid/NodeCache.cpp index 8d397255f72..67512bcd4de 100644 --- a/cpp/src/IceGrid/NodeCache.cpp +++ b/cpp/src/IceGrid/NodeCache.cpp @@ -764,8 +764,7 @@ NodeEntry::getInternalServerDescriptor(const ServerInfo& info) const } else { - props.push_back(createProperty("Ice.Admin.Endpoints", "tcp -h 127.0.0.1")); - props.push_back(createProperty("Ice.Admin.ServerName", "127.0.0.1")); + props.push_back(createProperty("Ice.Admin.Endpoints", "tcp -h localhost")); server->processRegistered = true; } } @@ -811,6 +810,31 @@ NodeEntry::getInternalServerDescriptor(const ServerInfo& info) const } props.push_back(createProperty("IceBox.LoadOrder", servicesStr)); + + if(iceVersion != 0 && iceVersion < 30300) + { + if(hasProperty(iceBox->propertySet.properties, "IceBox.ServiceManager.RegisterProcess")) + { + if(getProperty(iceBox->propertySet.properties, "IceBox.ServiceManager.RegisterProcess") != "0") + { + server->processRegistered = true; + } + } + else + { + props.push_back(createProperty("IceBox.ServiceManager.RegisterProcess", "1")); + server->processRegistered = true; + } + if(!hasProperty(iceBox->propertySet.properties, "IceBox.ServiceManager.Endpoints")) + { + props.push_back(createProperty("IceBox.ServiceManager.Endpoints", "tcp -h 127.0.0.1")); + } + } + if(!hasProperty(info.descriptor->propertySet.properties, "IceBox.InstanceName") && + hasProperty(iceBox->propertySet.properties, "IceBox.ServiceManager.Endpoints")) + { + props.push_back(createProperty("IceBox.InstanceName", server->id)); + } } // diff --git a/cpp/src/IceGrid/Parser.cpp b/cpp/src/IceGrid/Parser.cpp index 8d85f207cd0..3613eecc511 100644 --- a/cpp/src/IceGrid/Parser.cpp +++ b/cpp/src/IceGrid/Parser.cpp @@ -2171,7 +2171,7 @@ Parser::showFile(const string& id, const string& reader, const string& filename, bool head, bool tail, bool follow, int lineCount) { - int maxBytes = _communicator->getProperties()->getPropertyAsIntWithDefault("Ice.MessageMaxSize", 1024) * 1024; + int maxBytes = _communicator->getProperties()->getPropertyAsIntWithDefault("Ice.MessageSizeMax", 1024) * 1024; shared_ptr<FileIteratorPrx> it; diff --git a/cpp/src/IceGrid/RegistryI.h b/cpp/src/IceGrid/RegistryI.h index ca6f9d997d9..9154045d288 100644 --- a/cpp/src/IceGrid/RegistryI.h +++ b/cpp/src/IceGrid/RegistryI.h @@ -11,7 +11,7 @@ #include <IceGrid/PlatformInfo.h> #include <IceGrid/ReplicaSessionManager.h> #include <IceGrid/PluginFacade.h> -#include <Glacier2/PermissionsVerifier.h> +#include <Glacier2/PermissionsVerifierF.h> #include <IceStorm/Service.h> namespace IceGrid diff --git a/cpp/src/IceGrid/Scanner.cpp b/cpp/src/IceGrid/Scanner.cpp index 7250014a61b..23958d4a7c9 100644 --- a/cpp/src/IceGrid/Scanner.cpp +++ b/cpp/src/IceGrid/Scanner.cpp @@ -1,4 +1,3 @@ -#include <IceUtil/ScannerConfig.h> #line 1 "src/IceGrid/Scanner.cpp" // // Copyright (c) ZeroC, Inc. All rights reserved. @@ -53,7 +52,6 @@ typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; -typedef uint64_t flex_uint64_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; @@ -61,7 +59,6 @@ typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; -#endif /* ! C99 */ /* Limits of integral types. */ #ifndef INT8_MIN @@ -490,8 +487,8 @@ std::string parseSingleQuotedString(); } #define YY_USER_INIT initScanner(); -#line 490 "src/IceGrid/Scanner.cpp" -#line 491 "src/IceGrid/Scanner.cpp" +#line 497 "src/IceGrid/Scanner.cpp" +#line 498 "src/IceGrid/Scanner.cpp" #define INITIAL 0 @@ -708,10 +705,9 @@ YY_DECL } { -#line 50 "src/IceGrid/Scanner.l" - +#line 57 "src/IceGrid/Scanner.l" -#line 711 "src/IceGrid/Scanner.cpp" +#line 718 "src/IceGrid/Scanner.cpp" while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { @@ -770,7 +766,7 @@ do_action: /* This label is used only to access EOF actions. */ case 1: YY_RULE_SETUP -#line 52 "src/IceGrid/Scanner.l" +#line 59 "src/IceGrid/Scanner.l" { // C++-style comment int c; @@ -783,7 +779,7 @@ YY_RULE_SETUP YY_BREAK case 2: YY_RULE_SETUP -#line 62 "src/IceGrid/Scanner.l" +#line 69 "src/IceGrid/Scanner.l" { // C-style comment while(true) @@ -812,7 +808,7 @@ YY_RULE_SETUP case 3: /* rule 3 can match eol */ YY_RULE_SETUP -#line 87 "src/IceGrid/Scanner.l" +#line 94 "src/IceGrid/Scanner.l" { size_t len = strlen(yytext); for(size_t i = 0; i < len; ++i) @@ -827,14 +823,14 @@ YY_RULE_SETUP case 4: /* rule 4 can match eol */ YY_RULE_SETUP -#line 98 "src/IceGrid/Scanner.l" +#line 105 "src/IceGrid/Scanner.l" { return ';'; } YY_BREAK case 5: YY_RULE_SETUP -#line 102 "src/IceGrid/Scanner.l" +#line 109 "src/IceGrid/Scanner.l" { // "..."-type strings string s = parseDoubleQuotedString(); @@ -845,7 +841,7 @@ YY_RULE_SETUP YY_BREAK case 6: YY_RULE_SETUP -#line 110 "src/IceGrid/Scanner.l" +#line 117 "src/IceGrid/Scanner.l" { // '...'-type strings string s; @@ -873,7 +869,7 @@ YY_RULE_SETUP YY_BREAK case 7: YY_RULE_SETUP -#line 135 "src/IceGrid/Scanner.l" +#line 142 "src/IceGrid/Scanner.l" { // Simple strings string s; @@ -912,10 +908,10 @@ YY_RULE_SETUP YY_BREAK case 8: YY_RULE_SETUP -#line 171 "src/IceGrid/Scanner.l" +#line 178 "src/IceGrid/Scanner.l" ECHO; YY_BREAK -#line 915 "src/IceGrid/Scanner.cpp" +#line 922 "src/IceGrid/Scanner.cpp" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -1109,7 +1105,7 @@ static int yy_get_next_buffer (void) { /* Not enough room in the buffer - grow it. */ /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER; + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; int yy_c_buf_p_offset = (int) ((yy_c_buf_p) - b->yy_ch_buf); @@ -1246,7 +1242,7 @@ static int yy_get_next_buffer (void) yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; yy_is_jam = (yy_current_state == 18); - return yy_is_jam ? 0 : yy_current_state; + return yy_is_jam ? 0 : yy_current_state; } #ifndef YY_NO_UNPUT @@ -1678,8 +1674,8 @@ YY_BUFFER_STATE yy_scan_string (const char * yystr ) /** Setup the input buffer state to scan the given bytes. The next call to yylex() will * scan from a @e copy of @a bytes. - * @param bytes the byte buffer to scan - * @param len the number of bytes in the buffer pointed to by @a bytes. + * @param yybytes the byte buffer to scan + * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. * * @return the newly allocated buffer state object. */ @@ -1687,7 +1683,8 @@ YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len ) { YY_BUFFER_STATE b; char *buf; - yy_size_t n, i; + yy_size_t n; + int i; /* Get memory for full buffer, including space for trailing EOB's. */ n = (yy_size_t) (_yybytes_len + 2); @@ -1919,8 +1916,7 @@ void yyfree (void * ptr ) #define YYTABLES_NAME "yytables" -#line 171 "src/IceGrid/Scanner.l" - +#line 178 "src/IceGrid/Scanner.l" namespace IceGrid { @@ -2043,4 +2039,3 @@ parseSingleQuotedString() } } - diff --git a/cpp/src/IceGrid/Util.cpp b/cpp/src/IceGrid/Util.cpp index d7778805171..4cf9082d39c 100644 --- a/cpp/src/IceGrid/Util.cpp +++ b/cpp/src/IceGrid/Util.cpp @@ -265,7 +265,7 @@ IceGrid::toObjectInfo(const shared_ptr<Ice::Communicator>& communicator, const O } void -IceGrid::setupThreadPool(const shared_ptr<Properties>& properties, const string& name, int size, int maxSize, bool serialize) +IceGrid::setupThreadPool(const shared_ptr<Properties>& properties, const string& name, int size, int sizeMax, bool serialize) { if(properties->getPropertyAsIntWithDefault(name + ".Size", 0) < size) { @@ -278,16 +278,16 @@ IceGrid::setupThreadPool(const shared_ptr<Properties>& properties, const string& size = properties->getPropertyAsInt(name + ".Size"); } - if(maxSize > 0 && properties->getPropertyAsIntWithDefault(name + ".MaxSize", 0) < maxSize) + if(sizeMax > 0 && properties->getPropertyAsIntWithDefault(name + ".SizeMax", 0) < sizeMax) { - if(size >= maxSize) + if(size >= sizeMax) { - maxSize = size * 10; + sizeMax = size * 10; } ostringstream os; - os << maxSize; - properties->setProperty(name + ".MaxSize", os.str()); + os << sizeMax; + properties->setProperty(name + ".SizeMax", os.str()); } if(serialize) diff --git a/cpp/src/IceStorm/IceStormDB.cpp b/cpp/src/IceStorm/IceStormDB.cpp index c773d4f6b09..55a1d488856 100644 --- a/cpp/src/IceStorm/IceStormDB.cpp +++ b/cpp/src/IceStorm/IceStormDB.cpp @@ -29,13 +29,8 @@ main(int argc, char* argv[]) try { - Ice::CtrlCHandler ctrlCHandler; Ice::CommunicatorHolder ich(argc, argv); - communicator = ich.communicator(); - - ctrlCHandler.setCallback(&destroyCommunicator); - - status = run(Ice::argsToStringSeq(argc, argv)); + status = run(ich.communicator(), Ice::argsToStringSeq(argc, argv)); } catch(const std::exception& ex) { diff --git a/cpp/src/IceStorm/Subscriber.cpp b/cpp/src/IceStorm/Subscriber.cpp index 9edfe04ea21..a7ea42d3c13 100644 --- a/cpp/src/IceStorm/Subscriber.cpp +++ b/cpp/src/IceStorm/Subscriber.cpp @@ -869,10 +869,10 @@ Subscriber::Subscriber(shared_ptr<Instance> instance, if(_instance->observer()) { _observer.attach(_instance->observer()->getSubscriberObserver(_instance->serviceName(), - _rec.topicName, - _rec.obj, - _rec.theQoS, - _rec.theTopic, + rec.topicName, + rec.obj, + rec.theQoS, + rec.theTopic, toSubscriberState(_state), 0)); } |