/*

	ret_code
	0x00		No Error
	0x01		All Space
	0x02		First character is space
	0x03		Invalid character in MyCall
	0x04		module name is not space or Alpha
	0x05		Deny Call
*/

#include	"dsgwd_pi.h"

void	callcheck_error(char ret_code, char MyCall[])
{
	logfile = fopen (LOGFILE, "a");
	now = time(NULL);
	switch (ret_code)
	{
		case 0x01:
			fprintf (logfile, "%24.24s Invalid Call (All Spaces)\n", ctime(&now));
			break;
		case 0x02:
                        fprintf (logfile, "%24.24s Invalid Call (First character is space.)\n", ctime(&now));
			break;
		case 0x03:
                        fprintf (logfile, "%24.24s Invalid Call\n", ctime(&now));
			break;
		case 0x04:
                        fprintf (logfile, "%24.24s Invalid Call (All Spaces)\n", ctime(&now));
			break;
		case 0x05:
                        fprintf (logfile, "%24.24s Deny Call (%8.8s)\n", ctime(&now), MyCall);
			break;
	}
	fclose (logfile);
}

