Changeset 767 in ntrip for trunk/ntripclient


Ignore:
Timestamp:
Apr 4, 2008, 3:02:06 PM (12 years ago)
Author:
stuerze
Message:

minor changes regarding a combined proxy + caster response

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ntripclient/ntripclient.c

    r766 r767  
    11/*
    22  Easy example NTRIP client for POSIX.
    3   $Id: ntripclient.c,v 1.39 2007/12/14 07:22:29 stoecker Exp $
     3  $Id: ntripclient.c,v 1.40 2008/04/04 10:04:39 stoecker Exp $
    44  Copyright (C) 2003-2005 by Dirk Stoecker <soft@dstoecker.de>
    55   
     
    5757
    5858/* CVS revision and version */
    59 static char revisionstr[] = "$Revision: 1.39 $";
    60 static char datestr[]     = "$Date: 2007/12/14 07:22:29 $";
     59static char revisionstr[] = "$Revision: 1.40 $";
     60static char datestr[]     = "$Date: 2008/04/04 10:04:39 $";
    6161
    6262enum MODE { HTTP = 1, RTSP = 2, NTRIP1 = 3, AUTO = 4, END };
     
    898898            if(!k)
    899899            {
    900               if(numbytes > 17 && (!strncmp(buf, "HTTP/1.1 200 OK\r\n", 17)
    901               || !strncmp(buf, "HTTP/1.0 200 OK\r\n", 17)))
     900              if( numbytes > 17 &&
     901                 !strstr(buf, "ICY 200 OK")  &&  // case 'proxy & ntrip 1.0 caster'
     902                 (!strncmp(buf, "HTTP/1.1 200 OK\r\n", 17) ||
     903                  !strncmp(buf, "HTTP/1.0 200 OK\r\n", 17)) )
    902904              {
    903905                const char *datacheck = "Content-Type: gnss/data\r\n";
     
    925927                  chunkymode = 1;
    926928              }
    927               else if(numbytes < 12 || strncmp("ICY 200 OK\r\n", buf, 12))
     929              else if(!strstr(buf, "ICY 200 OK"))
    928930              {
    929931                fprintf(stderr, "Could not get the requested data: ");
Note: See TracChangeset for help on using the changeset viewer.