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

Fixed CORE-2779: User list header is displayed at the end of each returning data call to fbsvcmgr

This commit is contained in:
alexpeshkoff 2009-12-01 12:01:27 +00:00
parent 91ffe7847a
commit ee5a1fba50

View File

@ -572,10 +572,10 @@ public:
int gid, uid, admin; int gid, uid, admin;
private: private:
bool hasData; int hasData;
public: public:
UserPrint() : hasData(false) UserPrint() : hasData(0)
{ {
clear(); clear();
} }
@ -594,13 +594,18 @@ public:
void newUser() void newUser()
{ {
if (!hasData) if (hasData == 0)
{ {
hasData = true; hasData = 1;
printf("%-28.28s %-40.40s %4.4s %4.4s %3.3s\n", "Login",
"Full name", "uid", "gid", "adm");
return; return;
} }
if (hasData == 1)
{
printf("%-28.28s %-40.40s %4.4s %4.4s %3.3s\n", "Login",
"Full name", "uid", "gid", "adm");
hasData = 2;
}
printf("%-28.28s %-40.40s %4d %4d %3.3s\n", login.c_str(), printf("%-28.28s %-40.40s %4d %4d %3.3s\n", login.c_str(),
(first + " " + middle + " " + last).c_str(), uid, gid, admin ? "yes" : "no"); (first + " " + middle + " " + last).c_str(), uid, gid, admin ? "yes" : "no");
clear(); clear();