[MEDIUM] third cleanup and optimization of process_srv_data()

Some repeated tests were factored out.
Now the code makes sense and is fully understandable.
1 file changed