Changeset 10674 in ntrip
- Timestamp:
- Jul 1, 2025, 1:22:54 PM (3 days ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ntripserver/ntripserver.c
r9812 r10674 495 495 /*** proxy server handling ***/ 496 496 if (*proxyhost) { 497 inhost = proxyhost; 498 inport = proxyport; 499 i = snprintf(szSendBuffer, sizeof(szSendBuffer), "http://%s:%d", casterinhost, casterinport); 500 if ((i > SZ) || (i < 0)) { 501 fprintf(stderr, 502 "ERROR: Destination caster name/port to long - length = %d (max: %d)\n", 503 i, SZ); 504 exit(0); 497 // Input 498 if (strstr(casterinhost, "127.0.0.1") || 499 strstr(casterinhost, "localhost")) { 500 inhost = casterinhost; 501 outport = casterinport; 505 502 } else { 506 strncpy(get_extension, szSendBuffer, (size_t) i); 507 strcpy(szSendBuffer, ""); 508 i = 0; 509 } 503 inhost = proxyhost; 504 inport = proxyport; 505 i = snprintf(szSendBuffer, sizeof(szSendBuffer), "http://%s:%d", casterinhost, casterinport); 506 if ((i > SZ) || (i < 0)) { 507 fprintf(stderr, 508 "ERROR: Destination caster name/port to long - length = %d (max: %d)\n", 509 i, SZ); 510 exit(0); 511 } else { 512 strncpy(get_extension, szSendBuffer, (size_t) i); 513 strcpy(szSendBuffer, ""); 514 i = 0; 515 } 516 } 517 // Output 510 518 if (strstr(casterouthost, "127.0.0.1") || 511 519 strstr(casterouthost, "localhost")) {
Note:
See TracChangeset
for help on using the changeset viewer.