Changeset 9466 in ntrip for trunk/ntripserver
- Timestamp:
- Jun 10, 2021, 8:16:26 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ntripserver/ntripserver.c
r9464 r9466 757 757 input_init = 0; 758 758 break; 759 } else {// eventuell auskommentieren!760 init = 1;761 759 } 760 init = 1; 762 761 } 763 762 … … 888 887 close_session(casterouthost, mountpoint, session, rtsp_extension, 0); 889 888 usage(-2, argv[0]); 890 }else {fprintf(stderr, 889 } 890 else { 891 fprintf(stderr, 891 892 "Destination caster, server or proxy host <%s> \n", 892 893 outhost);} … … 904 905 if (setsockopt(socket_tcp, SOL_SOCKET, SO_REUSEADDR | SO_REUSEPORT, 905 906 &opt, sizeof(opt))) { 906 perror(" setsockopt");907 perror("ERROR: setsockopt"); 907 908 break; 908 909 } … … 925 926 // Forcefully attaching socket to the local port 926 927 if (bind(socket_tcp, (struct sockaddr *)&caster, sizeof(caster)) < 0) { 927 perror(" bind failed");928 perror("ERROR: bind failed"); 928 929 break; 929 930 } … … 935 936 if ((local_socket_tcp = accept(socket_tcp, (struct sockaddr *)&caster, 936 937 (socklen_t*)&addrlen)) < 0) { 937 perror(" accept");938 perror("ERROR: accept"); 938 939 break; 939 940 } … … 1472 1473 nBufferBytes = read(gps_socket, buffer, sizeof(buffer)); 1473 1474 #endif 1475 1474 1476 if (!nBufferBytes) { 1475 1477 fprintf(stderr, "WARNING: no data received from input\n"); … … 1498 1500 int cstop = 0; 1499 1501 int pos = 0; 1500 int chunksize = 0;1501 1502 int totalbytes = 0; 1503 static int chunksize = 0; 1504 static long i = 0; 1502 1505 char chunkBytes[BUFSZ] = { 0 }; 1503 1506 1504 long i;1505 1507 while (!sigint_received && !cstop && pos < nBufferBytes) { 1506 1508 switch (chunkymode) {
Note:
See TracChangeset
for help on using the changeset viewer.