TRQ-2410: returns the first one err code - merged from develop.

Conflicts:

	src/cmds/qstat.c