Changeset 339 in ntrip for trunk/ntripclient


Ignore:
Timestamp:
Nov 29, 2006, 11:43:15 AM (13 years ago)
Author:
stoecker
Message:

fixed illegal zero byte

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ntripclient/NtripLinuxClient.c

    r326 r339  
    11/*
    22  Easy example NTRIP client for Linux/Unix.
    3   $Id: NtripLinuxClient.c,v 1.21 2006/07/18 08:55:30 stoecker Exp $
     3  $Id: NtripLinuxClient.c,v 1.22 2006/11/23 14:39:50 stoecker Exp $
    44  Copyright (C) 2003-2005 by Dirk Stoecker <soft@dstoecker.de>
    55   
     
    4141
    4242/* CVS revision and version */
    43 static char revisionstr[] = "$Revision: 1.21 $";
    44 static char datestr[]     = "$Date: 2006/07/18 08:55:30 $";
     43static char revisionstr[] = "$Revision: 1.22 $";
     44static char datestr[]     = "$Date: 2006/11/23 14:39:50 $";
    4545
    4646struct Args
     
    348348        exit(1);
    349349      }
    350       i += encode(buf+i, MAXDATASIZE-i-5, args.user, args.password);
    351       if(i > MAXDATASIZE-5)
     350      i += encode(buf+i, MAXDATASIZE-i-4, args.user, args.password);
     351      if(i > MAXDATASIZE-4)
    352352      {
    353353        fprintf(stderr, "Username and/or password too long\n");
    354354        exit(1);
    355355      }
    356       snprintf(buf+i, 5, "\r\n\r\n");
    357       i += 5;
     356      buf[i++] = '\r';
     357      buf[i++] = '\n';
     358      buf[i++] = '\r';
     359      buf[i++] = '\n';
    358360    }
    359361    if(send(sockfd, buf, (size_t)i, 0) != i)
Note: See TracChangeset for help on using the changeset viewer.