@@ -71,6 +71,7 @@ public static List<object> ParseDatabaseInfo(byte[] buffer)
7171 case IscCodes . isc_info_next_transaction :
7272 case IscCodes . isc_info_active_transactions :
7373 case IscCodes . isc_info_active_tran_count :
74+ case IscCodes . fb_info_next_attachment :
7475 info . Add ( VaxInteger ( buffer , pos , length ) ) ;
7576 break ;
7677
@@ -94,16 +95,18 @@ public static List<object> ParseDatabaseInfo(byte[] buffer)
9495 break ;
9596
9697 case IscCodes . isc_info_db_id :
97- var dbFile = Encoding2 . Default . GetString ( buffer , pos + 2 , buffer [ pos + 1 ] ) ;
98- var sitePos = pos + 2 + buffer [ pos + 1 ] ;
99- int siteLength = buffer [ sitePos ] ;
100- var siteName = Encoding2 . Default . GetString ( buffer , sitePos + 1 , siteLength ) ;
98+ {
99+ var dbFile = Encoding2 . Default . GetString ( buffer , pos + 2 , buffer [ pos + 1 ] ) ;
100+ var sitePos = pos + 2 + buffer [ pos + 1 ] ;
101+ int siteLength = buffer [ sitePos ] ;
102+ var siteName = Encoding2 . Default . GetString ( buffer , sitePos + 1 , siteLength ) ;
101103
102- sitePos += siteLength + 1 ;
103- siteLength = buffer [ sitePos ] ;
104- siteName += "." + Encoding2 . Default . GetString ( buffer , sitePos + 1 , siteLength ) ;
104+ sitePos += siteLength + 1 ;
105+ siteLength = buffer [ sitePos ] ;
106+ siteName += "." + Encoding2 . Default . GetString ( buffer , sitePos + 1 , siteLength ) ;
105107
106- info . Add ( siteName + ":" + dbFile ) ;
108+ info . Add ( siteName + ":" + dbFile ) ;
109+ }
107110 break ;
108111
109112 case IscCodes . isc_info_implementation :
@@ -112,32 +115,38 @@ public static List<object> ParseDatabaseInfo(byte[] buffer)
112115
113116 case IscCodes . isc_info_isc_version :
114117 case IscCodes . isc_info_firebird_version :
115- var messagePosition = pos ;
116- var count = buffer [ messagePosition ] ;
117- for ( var i = 0 ; i < count ; i ++ )
118118 {
119- var messageLength = buffer [ messagePosition + 1 ] ;
120- info . Add ( Encoding2 . Default . GetString ( buffer , messagePosition + 2 , messageLength ) ) ;
121- messagePosition += 1 + messageLength ;
119+ var messagePosition = pos ;
120+ var count = buffer [ messagePosition ] ;
121+ for ( var i = 0 ; i < count ; i ++ )
122+ {
123+ var messageLength = buffer [ messagePosition + 1 ] ;
124+ info . Add ( Encoding2 . Default . GetString ( buffer , messagePosition + 2 , messageLength ) ) ;
125+ messagePosition += 1 + messageLength ;
126+ }
122127 }
123128 break ;
124129
125130 case IscCodes . isc_info_db_class :
126- var serverClass = VaxInteger ( buffer , pos , length ) ;
127- if ( serverClass == IscCodes . isc_info_db_class_classic_access )
128- {
129- info . Add ( "CLASSIC SERVER" ) ;
130- }
131- else
132131 {
133- info . Add ( "SUPER SERVER" ) ;
132+ var serverClass = VaxInteger ( buffer , pos , length ) ;
133+ if ( serverClass == IscCodes . isc_info_db_class_classic_access )
134+ {
135+ info . Add ( "CLASSIC SERVER" ) ;
136+ }
137+ else
138+ {
139+ info . Add ( "SUPER SERVER" ) ;
140+ }
134141 }
135142 break ;
136143
137144 case IscCodes . isc_info_creation_date :
138- var date = TypeDecoder . DecodeDate ( ( int ) VaxInteger ( buffer , pos , 4 ) ) ;
139- var time = TypeDecoder . DecodeTime ( ( int ) VaxInteger ( buffer , pos + 4 , 4 ) ) ;
140- info . Add ( date . Add ( time ) ) ;
145+ {
146+ var date = TypeDecoder . DecodeDate ( ( int ) VaxInteger ( buffer , pos , 4 ) ) ;
147+ var time = TypeDecoder . DecodeTime ( ( int ) VaxInteger ( buffer , pos + 4 , 4 ) ) ;
148+ info . Add ( date . Add ( time ) ) ;
149+ }
141150 break ;
142151
143152 default :
0 commit comments