@@ -61,7 +61,7 @@ namespace
6161
6262// Convert text descriptor into UTF8 string.
6363// Binary data converted into HEX representation.
64- bool descToUTF8 (const dsc * param, string& result)
64+ bool descToUTF8 (const paramdsc * param, string& result)
6565{
6666 UCHAR* address;
6767 USHORT length;
@@ -83,7 +83,7 @@ bool descToUTF8(const dsc* param, string& result)
8383 return false ;
8484 }
8585
86- if (param->getCharSet () == CS_BINARY)
86+ if (param->dsc_sub_type == CS_BINARY)
8787 {
8888 // Convert OCTETS and [VAR]BINARY to HEX string
8989
@@ -311,14 +311,11 @@ void TraceSQLStatementImpl::DSQLParamsImpl::fillParams()
311311 null_flag = DSC_null;
312312 }
313313
314- dsc* desc = NULL ;
315-
316314 const FB_SIZE_T idx = parameter->par_index - 1 ;
317315 if (idx >= m_descs.getCount ())
318316 m_descs.getBuffer (idx + 1 );
319317
320- desc = &m_descs[idx];
321-
318+ paramdsc* const desc = &m_descs[idx];
322319 *desc = parameter->par_desc ;
323320 desc->dsc_flags |= null_flag;
324321
@@ -335,19 +332,19 @@ FB_SIZE_T TraceSQLStatementImpl::DSQLParamsImpl::getCount()
335332 return m_descs.getCount ();
336333}
337334
338- const dsc * TraceSQLStatementImpl::DSQLParamsImpl::getParam (FB_SIZE_T idx)
335+ const paramdsc * TraceSQLStatementImpl::DSQLParamsImpl::getParam (FB_SIZE_T idx)
339336{
340337 fillParams ();
341338
342- if (idx >= 0 && idx < m_descs.getCount ())
339+ if (idx < m_descs.getCount ())
343340 return &m_descs[idx];
344341
345342 return NULL ;
346343}
347344
348345const char * TraceSQLStatementImpl::DSQLParamsImpl::getTextUTF8 (CheckStatusWrapper* status, FB_SIZE_T idx)
349346{
350- const dsc* param = getParam (idx);
347+ const paramdsc* const param = getParam (idx);
351348
352349 if (descToUTF8 (param, m_tempUTF8))
353350 return m_tempUTF8.c_str ();
@@ -377,14 +374,14 @@ FB_SIZE_T TraceParamsImpl::getCount()
377374 return m_descs->getCount ();
378375}
379376
380- const dsc * TraceParamsImpl::getParam (FB_SIZE_T idx)
377+ const paramdsc * TraceParamsImpl::getParam (FB_SIZE_T idx)
381378{
382379 return m_descs->getParam (idx);
383380}
384381
385382const char * TraceParamsImpl::getTextUTF8 (CheckStatusWrapper* status, FB_SIZE_T idx)
386383{
387- const dsc* param = getParam (idx);
384+ const paramdsc* const param = getParam (idx);
388385
389386 if (descToUTF8 (param, m_tempUTF8))
390387 return m_tempUTF8.c_str ();
@@ -465,7 +462,7 @@ void TraceDscFromMsg::fillParams()
465462 const dsc* fmtDesc = m_format->fmt_desc .begin ();
466463 const dsc* const fmtEnd = m_format->fmt_desc .end ();
467464
468- dsc * desc = m_descs.getBuffer (m_format->fmt_count / 2 );
465+ paramdsc * desc = m_descs.getBuffer (m_format->fmt_count / 2 );
469466
470467 for (; fmtDesc < fmtEnd; fmtDesc += 2 , desc++)
471468 {
@@ -477,7 +474,7 @@ void TraceDscFromMsg::fillParams()
477474 const ULONG nullOffset = (IPTR) fmtDesc[1 ].dsc_address ;
478475 const SSHORT* const nullPtr = (const SSHORT*) (m_inMsg + nullOffset);
479476 if (*nullPtr == -1 )
480- desc->setNull () ;
477+ desc->dsc_flags |= DSC_null ;
481478 }
482479}
483480
0 commit comments