Changeset 9466 in ntrip


Ignore:
Timestamp:
Jun 10, 2021, 8:16:26 AM (3 years ago)
Author:
stuerze
Message:

bug fixed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ntripserver/ntripserver.c

    r9464 r9466  
    757757              input_init = 0;
    758758              break;
    759             } else {// eventuell auskommentieren!
    760               init = 1;
    761759            }
     760            init = 1;
    762761          }
    763762
     
    888887        close_session(casterouthost, mountpoint, session, rtsp_extension, 0);
    889888        usage(-2, argv[0]);
    890       }else {fprintf(stderr,
     889      }
     890      else {
     891        fprintf(stderr,
    891892          "Destination caster, server or proxy host <%s> \n",
    892893          outhost);}
     
    904905        if (setsockopt(socket_tcp, SOL_SOCKET, SO_REUSEADDR | SO_REUSEPORT,
    905906                                                      &opt, sizeof(opt)))  {
    906             perror("setsockopt");
     907            perror("ERROR: setsockopt");
    907908            break;
    908909        }
     
    925926        // Forcefully attaching socket to the local port
    926927        if (bind(socket_tcp, (struct sockaddr *)&caster, sizeof(caster)) < 0)        {
    927             perror("bind failed");
     928            perror("ERROR: bind failed");
    928929            break;
    929930        }
     
    935936        if ((local_socket_tcp = accept(socket_tcp, (struct sockaddr *)&caster,
    936937                                      (socklen_t*)&addrlen)) < 0) {
    937             perror("accept");
     938            perror("ERROR: accept");
    938939            break;
    939940        }
     
    14721473        nBufferBytes = read(gps_socket, buffer, sizeof(buffer));
    14731474#endif
     1475
    14741476      if (!nBufferBytes) {
    14751477        fprintf(stderr, "WARNING: no data received from input\n");
     
    14981500      int cstop = 0;
    14991501      int pos = 0;
    1500       int chunksize = 0;
    15011502      int totalbytes = 0;
     1503      static int chunksize = 0;
     1504      static long i = 0;
    15021505      char chunkBytes[BUFSZ] = { 0 };
    15031506
    1504       long i;
    15051507      while (!sigint_received && !cstop && pos < nBufferBytes) {
    15061508        switch (chunkymode) {
Note: See TracChangeset for help on using the changeset viewer.