Changeset 339 in ntrip
- Timestamp:
- Nov 29, 2006, 11:43:15 AM (18 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ntripclient/NtripLinuxClient.c
r326 r339 1 1 /* 2 2 Easy example NTRIP client for Linux/Unix. 3 $Id: NtripLinuxClient.c,v 1.2 1 2006/07/18 08:55:30 stoecker Exp $3 $Id: NtripLinuxClient.c,v 1.22 2006/11/23 14:39:50 stoecker Exp $ 4 4 Copyright (C) 2003-2005 by Dirk Stoecker <soft@dstoecker.de> 5 5 … … 41 41 42 42 /* CVS revision and version */ 43 static char revisionstr[] = "$Revision: 1.2 1$";44 static char datestr[] = "$Date: 2006/ 07/18 08:55:30 $";43 static char revisionstr[] = "$Revision: 1.22 $"; 44 static char datestr[] = "$Date: 2006/11/23 14:39:50 $"; 45 45 46 46 struct Args … … 348 348 exit(1); 349 349 } 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) 352 352 { 353 353 fprintf(stderr, "Username and/or password too long\n"); 354 354 exit(1); 355 355 } 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'; 358 360 } 359 361 if(send(sockfd, buf, (size_t)i, 0) != i) -
trunk/ntripserver/NtripLinuxServer.c
r326 r339 41 41 */ 42 42 43 /* $Id: NtripLinuxServer.c,v 1.2 3 2006/08/16 08:33:04stoecker Exp $43 /* $Id: NtripLinuxServer.c,v 1.24 2006/11/23 14:39:50 stoecker Exp $ 44 44 * Changes - Version 0.7 45 45 * Sep 22 2003 Steffen Tschirpke <St.Tschirpke@actina.de> … … 463 463 } 464 464 nBufferBytes += encode(szSendBuffer+nBufferBytes, 465 sizeof(szSendBuffer)-nBufferBytes- 5, stream_user, stream_password);466 if(nBufferBytes > (int)sizeof(szSendBuffer)- 5)465 sizeof(szSendBuffer)-nBufferBytes-4, stream_user, stream_password); 466 if(nBufferBytes > (int)sizeof(szSendBuffer)-4) 467 467 { 468 468 fprintf(stderr, "Username and/or password too long\n"); 469 469 exit(1); 470 470 } 471 snprintf(szSendBuffer+nBufferBytes, 5, "\r\n\r\n"); 472 nBufferBytes += 5; 471 szSendBuffer[nBufferBytes++] = '\r'; 472 szSendBuffer[nBufferBytes++] = '\n'; 473 szSendBuffer[nBufferBytes++] = '\r'; 474 szSendBuffer[nBufferBytes++] = '\n'; 473 475 } 474 476 else … … 624 626 sizeof(const char *)); 625 627 /* send message to caster */ 626 szSendBuffer[0] = '\0'; 627 sprintf(szSendBuffer, "SOURCE %s /%s\r\n", password, mountpoint); 628 strcat(szSendBuffer, "Source-Agent: "); 629 strcat(szSendBuffer, VERSION); 630 strcat(szSendBuffer, "\r\n"); 631 strcat(szSendBuffer, "\r\n"); 632 strcat(szSendBuffer, "\0"); 633 nBufferBytes = strlen(szSendBuffer); 628 nBufferBytes = sprintf(szSendBuffer, "SOURCE %s /%s\r\nSource-Agent: " 629 VERSION "\r\n\r\n", password, mountpoint); 634 630 if((send(sock_id, szSendBuffer, (size_t)nBufferBytes, 0)) != nBufferBytes) 635 631 { -
trunk/rtcm3torinex/rtcm3torinex.c
r328 r339 1 1 /* 2 2 Converter for RTCM3 data to RINEX. 3 $Id: rtcm3torinex.c,v 1.1 2 2006/11/23 14:39:50stoecker Exp $3 $Id: rtcm3torinex.c,v 1.13 2006/11/24 09:53:42 stoecker Exp $ 4 4 Copyright (C) 2005-2006 by Dirk Stoecker <stoecker@euronik.eu> 5 5 … … 51 51 52 52 /* CVS revision and version */ 53 static char revisionstr[] = "$Revision: 1.1 2$";53 static char revisionstr[] = "$Revision: 1.13 $"; 54 54 55 55 static uint32_t CRC24(long size, const unsigned char *buf) … … 990 990 991 991 #ifndef NO_RTCM3_MAIN 992 static char datestr[] = "$Date: 2006/11/2 3 14:39:50$";992 static char datestr[] = "$Date: 2006/11/24 09:53:42 $"; 993 993 994 994 /* The string, which is send as agent in HTTP request */ … … 1334 1334 exit(1); 1335 1335 } 1336 i += encode(buf+i, MAXDATASIZE-i- 5, args.user, args.password);1337 if(i > MAXDATASIZE- 5)1336 i += encode(buf+i, MAXDATASIZE-i-4, args.user, args.password); 1337 if(i > MAXDATASIZE-4) 1338 1338 { 1339 1339 RTCM3Error("Username and/or password too long\n"); 1340 1340 exit(1); 1341 1341 } 1342 snprintf(buf+i, 5, "\r\n\r\n"); 1343 i += 5; 1342 buf[i++] = '\r'; 1343 buf[i++] = '\n'; 1344 buf[i++] = '\r'; 1345 buf[i++] = '\n'; 1344 1346 } 1345 1347 if(send(sockfd, buf, (size_t)i, 0) != i)
Note:
See TracChangeset
for help on using the changeset viewer.