--- parser3/src/main/pa_sql_driver_manager.C 2003/03/24 17:24:42 1.69.2.17.2.9 +++ parser3/src/main/pa_sql_driver_manager.C 2003/03/26 18:52:50 1.69.2.17.2.11 @@ -5,7 +5,7 @@ Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char* IDENT_SQL_DRIVER_MANAGER_C="$Date: 2003/03/24 17:24:42 $"; +static const char* IDENT_SQL_DRIVER_MANAGER_C="$Date: 2003/03/26 18:52:50 $"; #include "pa_sql_driver_manager.h" #include "ltdl.h" @@ -48,7 +48,7 @@ static void expire_connections( SQL_Driver_manager::connection_cache_type::key_type /*key*/, SQL_Driver_manager::connection_cache_type::value_type stack, time_t older_dies) { - for(int i=0; i<=stack->top_index(); i++) + for(size_t i=0; i<=stack->top_index(); i++) expire_connection(*stack->get(i), older_dies); } @@ -90,11 +90,13 @@ SQL_Connection* SQL_Driver_manager::get_ if(connection) url_cstr=0; // calm, compiler else { // no cached connection or it were unpingabe: connect/reconnect - if(aurl.pos("://")==STRING_NOT_FOUND) + url_cstr=aurl.cstrm(); + if(!strstr(url_cstr, "://")) throw Exception("parser.runtime", aurl.length()?&aurl:0, "connection string must start with protocol://"); + char *protocol_cstr=lsplit(&url_cstr, ':'); // skip "//" after ':' while(*url_cstr=='/')