Mercurial > hg > nnchat
comparison main.c @ 642:c8e5949a8961
Use th-libs functions.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 07 Jan 2015 16:56:54 +0200 |
parents | 51dd01786d25 |
children | d6792ccefe2f |
comparison
equal
deleted
inserted
replaced
641:4bb6557c2b44 | 642:c8e5949a8961 |
---|---|
196 size_t len; | 196 size_t len; |
197 | 197 |
198 optProxyEnable = FALSE; | 198 optProxyEnable = FALSE; |
199 | 199 |
200 // Handle disable case | 200 // Handle disable case |
201 if (strncasecmp(uri, "disab", 5) == 0) | 201 if (th_strncasecmp(uri, "disab", 5) == 0) |
202 return TRUE; | 202 return TRUE; |
203 | 203 |
204 // Split the URI | 204 // Split the URI |
205 if (!argSplitStr(uri, "://", &proto, &rest)) | 205 if (!argSplitStr(uri, "://", &proto, &rest)) |
206 { | 206 { |
207 THERR("Malformed proxy URI, should be <type>://[<userid>[:passwd]@]<host>[:<port>]\n"); | 207 THERR("Malformed proxy URI, should be <type>://[<userid>[:passwd]@]<host>[:<port>]\n"); |
208 goto out; | 208 goto out; |
209 } | 209 } |
210 | 210 |
211 // Validate proxy type | 211 // Validate proxy type |
212 if (strcasecmp(proto, "socks4") == 0) | 212 if (th_strcasecmp(proto, "socks4") == 0) |
213 optProxyType = TH_PROXY_SOCKS4; | 213 optProxyType = TH_PROXY_SOCKS4; |
214 else | 214 else |
215 if (strcasecmp(proto, "socks4a") == 0) | 215 if (th_strcasecmp(proto, "socks4a") == 0) |
216 optProxyType = TH_PROXY_SOCKS4A; | 216 optProxyType = TH_PROXY_SOCKS4A; |
217 else | 217 else |
218 if (strcasecmp(proto, "socks5") == 0) | 218 if (th_strcasecmp(proto, "socks5") == 0) |
219 optProxyType = TH_PROXY_SOCKS5; | 219 optProxyType = TH_PROXY_SOCKS5; |
220 else | 220 else |
221 { | 221 { |
222 THERR("Invalid proxy type specified: '%s'\n", proto); | 222 THERR("Invalid proxy type specified: '%s'\n", proto); |
223 goto out; | 223 goto out; |
331 | 331 |
332 case 13: | 332 case 13: |
333 { | 333 { |
334 int i; | 334 int i; |
335 for (i = 0; i < nn_room_data_n; i++) | 335 for (i = 0; i < nn_room_data_n; i++) |
336 if (!strcasecmp(nn_room_data[i].name, optArg)) | 336 if (!th_strcasecmp(nn_room_data[i].name, optArg)) |
337 { | 337 { |
338 optPort = nn_room_data[i].port; | 338 optPort = nn_room_data[i].port; |
339 return TRUE; | 339 return TRUE; |
340 } | 340 } |
341 | 341 |