author | zautrix <zautrix> | 2004-10-05 11:13:51 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-05 11:13:51 (UTC) |
commit | 50ab40e1e02ad7c65c17a78d08116a808b1257aa (patch) (unidiff) | |
tree | 0d1939e2297fa7bbd8e1f2030f154463854164c6 /gammu/emb/common/gsmcomon.c | |
parent | cf8616f64f20e5448d4ff644f7cc15750cf3f85f (diff) | |
download | kdepimpi-50ab40e1e02ad7c65c17a78d08116a808b1257aa.zip kdepimpi-50ab40e1e02ad7c65c17a78d08116a808b1257aa.tar.gz kdepimpi-50ab40e1e02ad7c65c17a78d08116a808b1257aa.tar.bz2 |
updated to latest gammu version
-rw-r--r-- | gammu/emb/common/gsmcomon.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/gammu/emb/common/gsmcomon.c b/gammu/emb/common/gsmcomon.c index d094ef3..445c3a6 100644 --- a/gammu/emb/common/gsmcomon.c +++ b/gammu/emb/common/gsmcomon.c | |||
@@ -112,65 +112,66 @@ unsigned char *GetMsg (INI_Section *cfg, unsigned char *default_string) | |||
112 | return default_string; | 112 | return default_string; |
113 | } | 113 | } |
114 | 114 | ||
115 | typedef struct { | 115 | typedef struct { |
116 | GSM_Error ErrorNum; | 116 | GSM_Error ErrorNum; |
117 | unsigned char *ErrorText; | 117 | unsigned char *ErrorText; |
118 | } PrintErrorEntry; | 118 | } PrintErrorEntry; |
119 | 119 | ||
120 | static PrintErrorEntry PrintErrorEntries[] = { | 120 | static PrintErrorEntry PrintErrorEntries[] = { |
121 | {ERR_NONE, "No error."}, | 121 | {ERR_NONE, "No error."}, |
122 | {ERR_DEVICEOPENERROR, "Error opening device. Unknown/busy or no permissions."}, | 122 | {ERR_DEVICEOPENERROR, "Error opening device. Unknown/busy or no permissions."}, |
123 | {ERR_DEVICELOCKED, "Error opening device. Device locked."}, | 123 | {ERR_DEVICELOCKED, "Error opening device. Device locked."}, |
124 | {ERR_DEVICENOTEXIST, "Error opening device. Not exist."}, | 124 | {ERR_DEVICENOTEXIST, "Error opening device. Doesn't exist."}, |
125 | {ERR_DEVICEBUSY, "Error opening device. Already opened by other application."}, | 125 | {ERR_DEVICEBUSY, "Error opening device. Already opened by other application."}, |
126 | {ERR_DEVICENOPERMISSION,"Error opening device. No permissions."}, | 126 | {ERR_DEVICENOPERMISSION,"Error opening device. No permissions."}, |
127 | {ERR_DEVICENODRIVER, "Error opening device. No required driver in operating system."}, | 127 | {ERR_DEVICENODRIVER, "Error opening device. No required driver in operating system."}, |
128 | {ERR_DEVICENOTWORK, "Error opening device. Some hardware not connected/wrong configured."}, | 128 | {ERR_DEVICENOTWORK, "Error opening device. Some hardware not connected/wrong configured."}, |
129 | {ERR_DEVICEDTRRTSERROR, "Error setting device DTR or RTS."}, | 129 | {ERR_DEVICEDTRRTSERROR, "Error setting device DTR or RTS."}, |
130 | {ERR_DEVICECHANGESPEEDERROR,"Error setting device speed. Maybe speed not supported."}, | 130 | {ERR_DEVICECHANGESPEEDERROR,"Error setting device speed. Maybe speed not supported."}, |
131 | {ERR_DEVICEWRITEERROR, "Error writing device."}, | 131 | {ERR_DEVICEWRITEERROR, "Error writing device."}, |
132 | {ERR_DEVICEREADERROR, "Error during reading device"}, | 132 | {ERR_DEVICEREADERROR, "Error during reading device."}, |
133 | {ERR_DEVICEPARITYERROR, "Can't set parity on device"}, | 133 | {ERR_DEVICEPARITYERROR, "Can't set parity on device."}, |
134 | {ERR_TIMEOUT, "No response in specified timeout. Probably phone not connected."}, | 134 | {ERR_TIMEOUT, "No response in specified timeout. Probably phone not connected."}, |
135 | /* Some missed */ | 135 | /* Some missed */ |
136 | {ERR_UNKNOWNRESPONSE, "Unknown response from phone. See readme.txt, how to report it."}, | 136 | {ERR_UNKNOWNRESPONSE, "Unknown response from phone. See readme.txt, how to report it."}, |
137 | /* Some missed */ | 137 | /* Some missed */ |
138 | {ERR_UNKNOWNCONNECTIONTYPESTRING,"Unknown connection type string. Check config file."}, | 138 | {ERR_UNKNOWNCONNECTIONTYPESTRING,"Unknown connection type string. Check config file."}, |
139 | {ERR_UNKNOWNMODELSTRING,"Unknown model type string. Check config file."}, | 139 | {ERR_UNKNOWNMODELSTRING,"Unknown model type string. Check config file."}, |
140 | {ERR_SOURCENOTAVAILABLE,"Some required functions not compiled for your OS. Please contact."}, | 140 | {ERR_SOURCENOTAVAILABLE,"Some required functions not compiled for your OS. Please contact."}, |
141 | {ERR_NOTSUPPORTED, "Function not supported by phone."}, | 141 | {ERR_NOTSUPPORTED, "Function not supported by phone."}, |
142 | {ERR_EMPTY, "Entry is empty"}, | 142 | {ERR_EMPTY, "Entry is empty"}, |
143 | {ERR_SECURITYERROR, "Security error. Maybe no PIN ?"}, | 143 | {ERR_SECURITYERROR, "Security error. Maybe no PIN ?"}, |
144 | {ERR_INVALIDLOCATION, "Invalid location. Maybe too high ?"}, | 144 | {ERR_INVALIDLOCATION, "Invalid location. Maybe too high ?"}, |
145 | {ERR_NOTIMPLEMENTED, "Function not implemented. Help required."}, | 145 | {ERR_NOTIMPLEMENTED, "Function not implemented. Help required."}, |
146 | {ERR_FULL, "Memory full."}, | 146 | {ERR_FULL, "Memory full."}, |
147 | {ERR_UNKNOWN, "Unknown error."}, | 147 | {ERR_UNKNOWN, "Unknown error."}, |
148 | /* Some missed */ | 148 | /* Some missed */ |
149 | {ERR_CANTOPENFILE, "Can't open specified file. Read only ?"}, | 149 | {ERR_CANTOPENFILE, "Can't open specified file. Read only ?"}, |
150 | {ERR_MOREMEMORY, "More memory required..."}, | 150 | {ERR_MOREMEMORY, "More memory required..."}, |
151 | {ERR_PERMISSION, "Permission to file/device required..."}, | 151 | {ERR_PERMISSION, "Permission to file/device required..."}, |
152 | {ERR_EMPTYSMSC, "Empty SMSC number. Set in phone or use -smscnumber"}, | 152 | {ERR_EMPTYSMSC, "Empty SMSC number. Set in phone or use -smscnumber."}, |
153 | {ERR_INSIDEPHONEMENU, "You're inside phone menu (during editing ?). Leave it and try again."}, | 153 | {ERR_INSIDEPHONEMENU, "You're inside phone menu (during editing ?). Leave it and try again."}, |
154 | {ERR_WORKINPROGRESS, "Function is during writing. If want help, please contact with authors."}, | 154 | {ERR_WORKINPROGRESS, "Function is during writing. If want help, please contact with authors."}, |
155 | {ERR_PHONEOFF, "Phone is disabled and connected to charger"}, | 155 | {ERR_PHONEOFF, "Phone is disabled and connected to charger."}, |
156 | {ERR_FILENOTSUPPORTED, "File format not supported by Gammu"}, | 156 | {ERR_FILENOTSUPPORTED, "File format not supported by Gammu."}, |
157 | {ERR_BUG, "Nobody is perfect, some bug appeared in protocol implementation. Please contact authors."}, | 157 | {ERR_BUG, "Nobody is perfect, some bug appeared in protocol implementation. Please contact authors."}, |
158 | {ERR_CANCELED, "Transfer was canceled by phone (you pressed cancel on phone?)."}, | 158 | {ERR_CANCELED, "Transfer was canceled by phone (you pressed cancel on phone?)"}, |
159 | /* Some missed */ | 159 | /* Some missed */ |
160 | {ERR_OTHERCONNECTIONREQUIRED,"Current connection type doesn't support called function."}, | 160 | {ERR_OTHERCONNECTIONREQUIRED,"Current connection type doesn't support called function."}, |
161 | /* Some missed */ | 161 | {ERR_WRONGCRC, "CRC error."}, |
162 | {ERR_INVALIDDATETIME, "Invalid date or time specified."}, | 162 | {ERR_INVALIDDATETIME, "Invalid date or time specified."}, |
163 | {ERR_MEMORY, "Phone memory error, maybe it is read only"}, | 163 | {ERR_MEMORY, "Phone memory error, maybe it is read only."}, |
164 | {ERR_INVALIDDATA, "Invalid data"}, | 164 | {ERR_INVALIDDATA, "Invalid data."}, |
165 | {ERR_FILEALREADYEXIST, "File with specified name already exist."}, | ||
165 | 166 | ||
166 | {0, ""} | 167 | {0, ""} |
167 | }; | 168 | }; |
168 | 169 | ||
169 | unsigned char *print_error(GSM_Error e, FILE *df, INI_Section *cfg) | 170 | unsigned char *print_error(GSM_Error e, FILE *df, INI_Section *cfg) |
170 | { | 171 | { |
171 | unsigned char *def = NULL; | 172 | unsigned char *def = NULL; |
172 | int i= 0; | 173 | int i= 0; |
173 | 174 | ||
174 | while (PrintErrorEntries[i].ErrorNum != 0) { | 175 | while (PrintErrorEntries[i].ErrorNum != 0) { |
175 | if (PrintErrorEntries[i].ErrorNum == e) { | 176 | if (PrintErrorEntries[i].ErrorNum == e) { |
176 | def = PrintErrorEntries[i].ErrorText; | 177 | def = PrintErrorEntries[i].ErrorText; |