8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 07:23:04 +01:00

Fixed delivery of errors from gstat service

This commit is contained in:
alexpeshkoff 2012-03-15 15:03:19 +00:00
parent 016d95d133
commit a82cc97e5e

View File

@ -1101,7 +1101,7 @@ int gstat(Firebird::UtilSvc* uSvc)
exit_code = tddba->exit_code; exit_code = tddba->exit_code;
tdba::restoreSpecific(); tdba::restoreSpecific();
if ((exit_code != FINI_OK) && uSvc->isService()) if ((exit_code != FINI_OK) && uSvc->isService() && tddba->dba_status[1])
{ {
uSvc->initStatus(); uSvc->initStatus();
uSvc->setServiceStatus(tddba->dba_status); uSvc->setServiceStatus(tddba->dba_status);
@ -1665,7 +1665,10 @@ static void db_error( SLONG status)
sprintf(s, "unknown Windows NT error %ld", status); sprintf(s, "unknown Windows NT error %ld", status);
} }
tddba->uSvc->printf(true, "%s\n", s); if (!tddba->uSvc->isService())
{
tddba->uSvc->printf(true, "%s\n", s);
}
dba_exit(FINI_ERROR, tddba); dba_exit(FINI_ERROR, tddba);
} }
@ -1846,7 +1849,10 @@ static void db_error( int status)
// FIXME: The strerror() function returns the appropriate description // FIXME: The strerror() function returns the appropriate description
// string, or an unknown error message if the error code is unknown. // string, or an unknown error message if the error code is unknown.
// EKU: p cannot be NULL! // EKU: p cannot be NULL!
tddba->uSvc->printf(true, "%s\n", strerror(status)); if (!tddba->uSvc->isService())
{
tddba->uSvc->printf(true, "%s\n", strerror(status));
}
dba_exit(FINI_ERROR, tddba); dba_exit(FINI_ERROR, tddba);
} }