2 *****************************************************************************
6 * Description: ëÏÄÙ ïÛÉÂÏË ÐÒÏÅËÔÁ StarGazer
8 * $Id: stg_error.c,v 1.1.1.1 2005/09/29 11:33:18 boris Exp $
10 *****************************************************************************
13 #include "stg_error.h"
18 *****************************************************************************
19 * -= ðÏÉÓË ÓÏÏÂÝÅÎÉÑ Ï ÏÛÉÂËÅ ÐÏ ËÏÄÕ ÏÛÉÂËÉ =-
20 *****************************************************************************
22 char * GetErrorString(RESULT_DATA res)
30 errorString = "OK: Work finished successfully";
34 case ERROR_CONFIG_READ:
36 errorString = "FAIL: Read config file";
41 errorString = "FAIL: Port value incorrect";
44 case ERROR_CLEAR_SID_DIR:
46 errorString = "FAIL: ClearSidDir() return fail";
49 case ERROR_UNKNOWN_HTTP_METHOD:
51 errorString = "FAIL: Umknown HTTP method";
54 case ERROR_NULL_HTTP_METHOD:
56 errorString = "FAIL: NULL HTTP method";
59 case ERROR_UNKNOWN_QUERY:
61 errorString = "FAIL: Unknown query";
66 errorString = "FAIL: Login Error";
69 case ERROR_PREPARE_USER_SELECTION_PAGE_0:
71 errorString = "FAIL: Prepare user selection page [0]";
76 errorString = "FAIL: Add iface";
79 case ERROR_ADD_TARIFF:
81 errorString = "FAIL: Add tariff";
86 errorString = "FAIL: Add group";
91 errorString = "FAIL: Add user";
94 case ERROR_CREATE_SID:
96 errorString = "FAIL: Create sid";
101 errorString = "FAIL: Set sid";
104 case ERROR_UPDATE_SID:
106 errorString = "FAIL: Update sid";
109 case ERROR_READ_SID_DATA:
111 errorString = "FAIL: Read sid data";
114 case ERROR_WRITE_SID_DATA:
116 errorString = "FAIL: Write sid data";
119 case ERROR_REMOVE_EXPIRED_SID:
121 errorString = "FAIL: Remove expired sids";
125 case ERROR_MEMORY_ALLOCATE:
127 errorString = "FAIL: Error memory allocation";
130 case ERROR_MEMORY_DESPOSE:
132 errorString = "FAIL: Error memory depose";
135 case ERROR_NULL_QUERY:
137 errorString = "FAIL: Query is NULL";
142 errorString = "FAIL: Error query";
146 case ERROR_ARC_DATA_FULL:
148 errorString = "FAIL: Arc data is full";
151 case ERROR_ARC_PERCENT:
153 errorString = "FAIL: Arc percent != 100%";
158 errorString = "FAIL: Unknown error";
162 return (errorString);
163 }/* GetErrorString() */