Changeset 1811 in ntrip


Ignore:
Timestamp:
Apr 27, 2009, 11:49:54 AM (13 years ago)
Author:
stoecker
Message:

session id is unsigned

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ntripclient/ntripclient.c

    r1569 r1811  
    11/*
    22  NTRIP client for POSIX.
    3   $Id: ntripclient.c,v 1.46 2008/11/04 15:35:03 stoecker Exp $
     3  $Id: ntripclient.c,v 1.47 2009/02/10 12:18:23 stoecker Exp $
    44  Copyright (C) 2003-2008 by Dirk Stöcker <soft@dstoecker.de>
    55
     
    6565
    6666/* CVS revision and version */
    67 static char revisionstr[] = "$Revision: 1.46 $";
    68 static char datestr[]     = "$Date: 2008/11/04 15:35:03 $";
     67static char revisionstr[] = "$Revision: 1.47 $";
     68static char datestr[]     = "$Date: 2009/02/10 12:18:23 $";
    6969
    7070enum MODE { HTTP = 1, RTSP = 2, NTRIP1 = 3, AUTO = 4, UDP = 5, END };
     
    706706        if(args.mode == UDP)
    707707        {
    708           int session, tim, seq, init;
     708          unsigned int session;
     709          int tim, seq, init;
    709710          char rtpbuf[1526];
    710711          int i=12, j;
     
    875876                    {
    876877                      time_t ct;
    877                       int u,v,w;
     878                      int u,v;
     879                      unsigned int w;
    878880                      u = ((unsigned char)rtpbuf[2]<<8)+(unsigned char)rtpbuf[3];
    879881                      v = ((unsigned char)rtpbuf[4]<<24)+((unsigned char)rtpbuf[5]<<16)
     
    11451147                "PLAY rtsp://%s%s%s/%s RTSP/1.0\r\n"
    11461148                "CSeq: %d\r\n"
    1147                 "Session: %d\r\n"
     1149                "Session: %u\r\n"
    11481150                "\r\n",
    11491151                args.server, proxyserver ? ":" : "", proxyserver ? args.port : "",
     
    12391241                            "GET_PARAMETER rtsp://%s%s%s/%s RTSP/1.0\r\n"
    12401242                            "CSeq: %d\r\n"
    1241                             "Session: %d\r\n"
     1243                            "Session: %u\r\n"
    12421244                            "\r\n",
    12431245                            args.server, proxyserver ? ":" : "", proxyserver
     
    12901292                  "TEARDOWN rtsp://%s%s%s/%s RTSP/1.0\r\n"
    12911293                  "CSeq: %d\r\n"
    1292                   "Session: %d\r\n"
     1294                  "Session: %u\r\n"
    12931295                  "\r\n",
    12941296                  args.server, proxyserver ? ":" : "", proxyserver ? args.port : "",
  • trunk/ntripserver/ntripserver.c

    r1573 r1811  
    11/*
    2  * $Id: ntripserver.c,v 1.46 2009/02/10 12:20:09 stoecker Exp $
     2 * $Id: ntripserver.c,v 1.47 2009/02/11 10:20:32 stoecker Exp $
    33 *
    44 * Copyright (c) 2003...2007
     
    3737
    3838/* CVS revision and version */
    39 static char revisionstr[] = "$Revision: 1.46 $";
    40 static char datestr[]     = "$Date: 2009/02/10 12:20:09 $";
     39static char revisionstr[] = "$Revision: 1.47 $";
     40static char datestr[]     = "$Date: 2009/02/11 10:20:32 $";
    4141
    4242#include <ctype.h>
     
    136136/* Forward references */
    137137static void send_receive_loop(sockettype sock, int outmode,
    138   struct sockaddr * pcasterRTP, socklen_t length, int rtpssrc);
     138  struct sockaddr * pcasterRTP, socklen_t length, unsigned int rtpssrc);
    139139static void usage(int, char *);
    140140static int  encode(char *buf, int size, const char *user, const char *pwd);
     
    220220  int                client_port = 0;
    221221  int                server_port = 0;
    222   int                session = 0;
     222  unsigned int       session = 0;
    223223  socklen_t          len = 0;
    224224  int                i = 0;
     
    933933        case UDP:
    934934          {
    935             int session;
     935            unsigned int session;
    936936            char rtpbuf[1526];
    937937            int i=12, j;
     
    13171317                "RECORD rtsp://%s%s/%s RTSP/1.0\r\n"
    13181318                "CSeq: %d\r\n"
    1319                 "Session: %d\r\n"
     1319                "Session: %u\r\n"
    13201320                "\r\n",
    13211321                casterouthost, rtsp_extension,  mountpoint,  udp_cseq++,
     
    13741374
    13751375static void send_receive_loop(sockettype sock, int outmode, struct sockaddr* pcasterRTP,
    1376 socklen_t length, int rtpssrc)
     1376socklen_t length, unsigned int rtpssrc)
    13771377{
    13781378  int      nodata = 0;
     
    15791579      i = recv(socket_tcp, rtpbuf, sizeof(rtpbuf), 0);
    15801580      if(i >= 12 && (unsigned char)rtpbuf[0] == (2 << 6) && rtpssrc ==
    1581       (((unsigned char)rtpbuf[8]<<24)+((unsigned char)rtpbuf[9]<<16)
     1581      (unsigned int)(((unsigned char)rtpbuf[8]<<24)+((unsigned char)rtpbuf[9]<<16)
    15821582      +((unsigned char)rtpbuf[10]<<8)+(unsigned char)rtpbuf[11]))
    15831583      {
     
    16941694        "GET_PARAMETER rtsp://%s%s/%s RTSP/1.0\r\n"
    16951695        "CSeq: %d\r\n"
    1696         "Session: %d\r\n"
     1696        "Session: %u\r\n"
    16971697        "\r\n",
    16981698        casterouthost, rtsp_extension,  mountpoint,  udp_cseq++, rtpssrc);
     
    22822282        "TEARDOWN rtsp://%s%s/%s RTSP/1.0\r\n"
    22832283        "CSeq: %d\r\n"
    2284         "Session: %d\r\n"
     2284        "Session: %u\r\n"
    22852285        "\r\n",
    22862286        caster_addr, rtsp_ext, mountpoint, udp_cseq++, session);
Note: See TracChangeset for help on using the changeset viewer.