Subject | Re: [ib-support] isc_info_svc_svr_db_info query does not return database name |
---|---|
Author | Arno Brinkman |
Post date | 2003-06-04T07:24:06Z |
Hi ,
Isn't there an increment missing :
p += sizeof(unsigned short) ;
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
Isn't there an increment missing :
> /* Extract data from result Buffer */Shouldn't here be :
> 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 :
> {
p += sizeof(unsigned short) ;
> /* Data base name in use */Regards,
> 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 ;
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