Subject Re: [ib-support] isc_info_svc_svr_db_info query does not return database name
Author Arno Brinkman
Hi ,

Isn't there an increment missing :

> /* Extract data from result Buffer */
> do
> {
> switch(*p++)
> {
> - - - other working services here -----
>
> case isc_info_svc_svr_db_info :
> {
> NumberOfDatabases = 0 ;
> NumberOfAttachments = 0 ;
> do
> {
> switch(*p++)
> {
> case isc_spb_dbname :
> {

Shouldn't here be :

p += sizeof(unsigned short) ;


> /* Data base name in use */
> path_length = (unsigned short) isc_vax_integer(p
> , sizeof(unsigned short)) ;
> p += sizeof(unsigned short) ;
> DBName[NumberOfDatabases] = (char *)
> malloc(path_length+1) ;
> strncpy(DBName[NumberOfDatabases] , p ,
> path_length) ;
> DBName[NumberOfDatabases][path_length] = 0 ;
>
> p += path_length ;
> NumberOfDatabases++ ;
> break ;
> }
>
> case isc_spb_num_att :
> {
> p += sizeof(unsigned short) ;
> NumberOfAttachments = (unsigned long)
> isc_vax_integer(p , sizeof(unsigned long)) ;
>
> p += sizeof(unsigned long) ;
>
> break ;
> }
>
> case isc_spb_num_db :
> {
> unsigned long nDatabases ;
>
> p += sizeof(unsigned short) ;
> nDatabases = (unsigned long)isc_vax_integer(p, sizeof
> (unsigned long)) ;
>
> p += sizeof(unsigned long) ;
>
> break ;
> }
> }
> } while (*p != isc_info_flag_end) ;
>
> break ;

Regards,
Arno Brinkman
ABVisie

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Firebird links :
http://www.firebirdsql.com
http://www.firebirdsql.info
http://www.fingerbird.de/
http://www.comunidade-firebird.org/


Nederlandse firebird nieuwsgroep :
news://80.126.130.81