150
150
} else if (val == 3) {
151
SetAppParam ("NCBI", "NET_SERV", "SRV_CONN_MODE", "SERVICE");
152
SetAppParam ("NCBI", "NET_SERV", "FIREWALL", "TRUE");
151
SetAppParam ("NCBI", "CONN", "FIREWALL", "TRUE");
153
152
GetTitle (ncp->proxyHost, str, sizeof (str));
154
153
if (! StringHasNoText (str)) {
155
SetAppParam ("NCBI", "NET_SERV", "SRV_HTTP_PROXY_HOST", str);
154
SetAppParam ("NCBI", "CONN", "HTTP_PROXY_HOST", str);
156
155
GetTitle (ncp->proxyPort, str, sizeof (str));
157
156
if (StringICmp (str, "80") == 0) {
160
159
if (! StringHasNoText (str)) {
161
SetAppParam ("NCBI", "NET_SERV", "SRV_HTTP_PROXY_PORT", str);
160
SetAppParam ("NCBI", "CONN", "HTTP_PROXY_PORT", str);
163
SetAppParam ("NCBI", "NET_SERV", "SRV_HTTP_PROXY_PORT", NULL);
162
SetAppParam ("NCBI", "CONN", "HTTP_PROXY_PORT", NULL);
166
SetAppParam ("NCBI", "NET_SERV", "SRV_HTTP_PROXY_HOST", NULL);
167
SetAppParam ("NCBI", "NET_SERV", "SRV_HTTP_PROXY_PORT", NULL);
165
SetAppParam ("NCBI", "CONN", "HTTP_PROXY_HOST", NULL);
166
SetAppParam ("NCBI", "CONN", "HTTP_PROXY_PORT", NULL);
169
168
GetTitle (ncp->firewallProxy, str, sizeof (str));
170
169
if (! StringHasNoText (str)) {
171
SetAppParam ("NCBI", "NET_SERV", "SRV_PROXY_HOST", str);
170
SetAppParam ("NCBI", "CONN", "PROXY_HOST", str);
173
SetAppParam ("NCBI", "NET_SERV", "SRV_PROXY_HOST", NULL);
172
SetAppParam ("NCBI", "CONN", "PROXY_HOST", NULL);
176
SetAppParam ("NCBI", "NET_SERV", "SRV_CONN_MODE", NULL);
177
SetAppParam ("NCBI", "NET_SERV", "FIREWALL", NULL);
178
SetAppParam ("NCBI", "NET_SERV", "SRV_HTTP_PROXY_HOST", NULL);
179
SetAppParam ("NCBI", "NET_SERV", "SRV_HTTP_PROXY_PORT", NULL);
180
SetAppParam ("NCBI", "NET_SERV", "SRV_PROXY_HOST", NULL);
175
SetAppParam ("NCBI", "CONN", "FIREWALL", NULL);
176
SetAppParam ("NCBI", "CONN", "HTTP_PROXY_HOST", NULL);
177
SetAppParam ("NCBI", "CONN", "HTTP_PROXY_PORT", NULL);
178
SetAppParam ("NCBI", "CONN", "PROXY_HOST", NULL);
183
181
if (GetStatus (ncp->dnsAvailable)) {
184
SetAppParam ("NCBI", "NET_SERV", "SRV_ENGINE_HOST", NULL);
182
SetAppParam ("NCBI", "CONN", "HOST", NULL);
186
SetAppParam ("NCBI", "NET_SERV", "SRV_ENGINE_HOST", "130.14.22.106");
184
SetAppParam ("NCBI", "CONN", "HOST", "130.14.29.110");
189
187
switch (GetValue (ncp->timeOut)) {
191
SetAppParam ("NCBI", "NET_SERV", "SRV_CONN_TIMEOUT", "10");
189
SetAppParam ("NCBI", "CONN", "TIMEOUT", "10");
194
SetAppParam ("NCBI", "NET_SERV", "SRV_CONN_TIMEOUT", "60");
192
SetAppParam ("NCBI", "CONN", "TIMEOUT", "60");
197
SetAppParam ("NCBI", "NET_SERV", "SRV_CONN_TIMEOUT", "300");
195
SetAppParam ("NCBI", "CONN", "TIMEOUT", "300");
200
SetAppParam ("NCBI", "NET_SERV", "SRV_CONN_TIMEOUT", NULL);
198
SetAppParam ("NCBI", "CONN", "TIMEOUT", NULL);
204
203
if (GetAppParam ("NCBI", "NET_SERV", "SRV_ENGINE_PORT", NULL, str, sizeof (str))) {
205
204
if (StringICmp (str, "80") == 0) {
206
205
SetAppParam ("NCBI", "NET_SERV", "SRV_ENGINE_PORT", NULL);
212
211
SetAppParam ("NCBI", "NET_SERV", "SRV_ENGINE_URL", NULL);
216
if (NoEntryExists ("SRV_CONN_MODE") &&
217
NoEntryExists ("FIREWALL") &&
218
NoEntryExists ("SRV_CONN_TIMEOUT") &&
219
NoEntryExists ("SRV_ENGINE_HOST") &&
220
NoEntryExists ("SRV_ENGINE_PORT") &&
221
NoEntryExists ("SRV_ENGINE_URL") &&
222
NoEntryExists ("SRV_HTTP_PROXY_HOST") &&
223
NoEntryExists ("SRV_HTTP_PROXY_PORT") &&
224
NoEntryExists ("SRV_PROXY_HOST")) {
225
SetAppParam ("NCBI", "NET_SERV", NULL, NULL);
216
if (NoEntryExists ("CONN", "FIREWALL") &&
217
NoEntryExists ("CONN", "TIMEOUT") &&
218
NoEntryExists ("CONN", "PROXY_HOST") &&
219
NoEntryExists ("CONN", "HOST") &&
220
NoEntryExists ("CONN", "HTTP_PROXY_HOST") &&
221
NoEntryExists ("CONN", "HTTP_PROXY_PORT")) {
222
SetAppParam ("NCBI", "CONN", NULL, NULL);
228
225
accepted = ncp->accepted;
420
417
if (! netCurrentlyOn) {
421
418
SafeSetValue (ncp->srvConnMode, 1);
422
419
Hide (ncp->netGroup);
423
} else if (GetAppParam ("NCBI", "NET_SERV", "SRV_CONN_MODE", "WWW", str, sizeof (str))) {
424
if (StringICmp (str, "FIREWALL") == 0) {
420
} else if (GetAppParam ("NCBI", "CONN", "FIREWALL", NULL, str, sizeof (str))) {
421
if (StringICmp (str, "TRUE") == 0) {
425
422
SafeSetValue (ncp->srvConnMode, 3);
426
} else if (StringICmp (str, "SERVICE") == 0) {
427
if (GetAppParam ("NCBI", "NET_SERV", "FIREWALL", "WWW", str, sizeof (str))) {
428
if (StringICmp (str, "TRUE") == 0) {
429
SafeSetValue (ncp->srvConnMode, 3);
434
if (GetAppParam ("NCBI", "NET_SERV", "SRV_HTTP_PROXY_HOST", NULL, str, sizeof (str))) {
425
if (GetAppParam ("NCBI", "CONN", "HTTP_PROXY_HOST", NULL, str, sizeof (str))) {
435
426
if (! StringHasNoText (str)) {
436
427
SafeSetTitle (ncp->proxyHost, str);
437
428
if (GetValue (ncp->srvConnMode) == 2) {
442
if (GetAppParam ("NCBI", "NET_SERV", "SRV_HTTP_PROXY_PORT", NULL, str, sizeof (str))) {
433
if (GetAppParam ("NCBI", "CONN", "HTTP_PROXY_PORT", NULL, str, sizeof (str))) {
443
434
if (! StringHasNoText (str)) {
444
435
SafeSetTitle (ncp->proxyPort, str);
447
if (GetAppParam ("NCBI", "NET_SERV", "SRV_PROXY_HOST", NULL, str, sizeof (str))) {
438
if (GetAppParam ("NCBI", "CONN", "PROXY_HOST", NULL, str, sizeof (str))) {
448
439
if (! StringHasNoText (str)) {
449
440
SafeSetTitle (ncp->firewallProxy, str);
452
if (GetAppParam ("NCBI", "NET_SERV", "SRV_ENGINE_HOST", NULL, str, sizeof (str))) {
453
if (StringICmp (str, "130.14.22.106") == 0 || StringICmp (str, "130.14.22.107") == 0 ) {
443
if (GetAppParam ("NCBI", "CONN", "HOST", NULL, str, sizeof (str))) {
444
if (StringICmp (str, "130.14.29.110") == 0) {
454
445
SafeSetStatus (ncp->dnsAvailable, FALSE);
457
if (GetAppParam ("NCBI", "NET_SERV", "SRV_CONN_TIMEOUT", "30", str, sizeof (str))) {
448
if (GetAppParam ("NCBI", "CONN", "TIMEOUT", "30", str, sizeof (str))) {
458
449
if (StringICmp (str, "10") == 0) {
459
450
SafeSetValue (ncp->timeOut, 1);
460
451
} else if (StringICmp (str, "60") == 0) {