Changeset 1811 in ntrip for trunk/ntripserver


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

session id is unsigned

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.