On 07/16/12 16:06, Dimitry Sibiryakov wrote: > Hello, All. > > Currently service manager has fixed name service_mgr, but AFAICS in code, > this name > isn't used anywhere. > Is it possible to ignore the name then? > > I have a problem: I got a connection string from user for creation of > database. Say, I > want to check server (engine) version before creation to set correct SQL > dialect and/or > default character set. DY suggested to use services to obtain the version, > but in this > case I have to parse the connection string to extract server name and > protocol (and pray > that my parser works the same way as one in fbclient). If service manager > name was > ignored, I could just feed the same connection string to isc_service_attach() > and leave > whole work to the parser in fbclient.
I understand what do you want. But before doing something with this let me mention that there are some more service manager names that are accepted by engine. Version1 services contain a part of utility's command line internally - for example service named 'Backup' already contains '-b' switch for gbak and so on. Telling true this is not a showstopper for your suggestion, because real suggestion is to: Drop V1 services in FB3. A half of them is long ago meaningless, because they try to use non-existing utilities like gdef or not remembered by me tool to control journal. Others (like mentioned Backup) are easily replaced with service_mgr-based services. Next, in FB3 they are not tested at all - I'm far not sure that all authentication tricks needed to support multiple security databases will work for V1 services. But what can be a real showstopper is anonymous service. Attaching it is documented (sorry, do not remember where) way to check is firebird started or not. ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel