refactored c_server.c to meet coding standards