Index: /trunk/ntripclient/NtripLinuxClient.c
===================================================================
--- /trunk/ntripclient/NtripLinuxClient.c	(revision 338)
+++ /trunk/ntripclient/NtripLinuxClient.c	(revision 339)
@@ -1,5 +1,5 @@
 /*
   Easy example NTRIP client for Linux/Unix.
-  $Id: NtripLinuxClient.c,v 1.21 2006/07/18 08:55:30 stoecker Exp $
+  $Id: NtripLinuxClient.c,v 1.22 2006/11/23 14:39:50 stoecker Exp $
   Copyright (C) 2003-2005 by Dirk Stoecker <soft@dstoecker.de>
     
@@ -41,6 +41,6 @@
 
 /* CVS revision and version */
-static char revisionstr[] = "$Revision: 1.21 $";
-static char datestr[]     = "$Date: 2006/07/18 08:55:30 $";
+static char revisionstr[] = "$Revision: 1.22 $";
+static char datestr[]     = "$Date: 2006/11/23 14:39:50 $";
 
 struct Args
@@ -348,12 +348,14 @@
         exit(1);
       }
-      i += encode(buf+i, MAXDATASIZE-i-5, args.user, args.password);
-      if(i > MAXDATASIZE-5)
+      i += encode(buf+i, MAXDATASIZE-i-4, args.user, args.password);
+      if(i > MAXDATASIZE-4)
       {
         fprintf(stderr, "Username and/or password too long\n");
         exit(1);
       }
-      snprintf(buf+i, 5, "\r\n\r\n");
-      i += 5;
+      buf[i++] = '\r';
+      buf[i++] = '\n';
+      buf[i++] = '\r';
+      buf[i++] = '\n';
     }
     if(send(sockfd, buf, (size_t)i, 0) != i)
Index: /trunk/ntripserver/NtripLinuxServer.c
===================================================================
--- /trunk/ntripserver/NtripLinuxServer.c	(revision 338)
+++ /trunk/ntripserver/NtripLinuxServer.c	(revision 339)
@@ -41,5 +41,5 @@
  */
 
-/* $Id: NtripLinuxServer.c,v 1.23 2006/08/16 08:33:04 stoecker Exp $
+/* $Id: NtripLinuxServer.c,v 1.24 2006/11/23 14:39:50 stoecker Exp $
  * Changes - Version 0.7
  * Sep 22 2003  Steffen Tschirpke <St.Tschirpke@actina.de>
@@ -463,12 +463,14 @@
           }
           nBufferBytes += encode(szSendBuffer+nBufferBytes,
-            sizeof(szSendBuffer)-nBufferBytes-5, stream_user, stream_password);
-          if(nBufferBytes > (int)sizeof(szSendBuffer)-5)
+            sizeof(szSendBuffer)-nBufferBytes-4, stream_user, stream_password);
+          if(nBufferBytes > (int)sizeof(szSendBuffer)-4)
           {
             fprintf(stderr, "Username and/or password too long\n");
             exit(1);
           }
-          snprintf(szSendBuffer+nBufferBytes, 5, "\r\n\r\n");
-          nBufferBytes += 5;
+          szSendBuffer[nBufferBytes++] = '\r';
+          szSendBuffer[nBufferBytes++] = '\n';
+          szSendBuffer[nBufferBytes++] = '\r';
+          szSendBuffer[nBufferBytes++] = '\n';
         }
         else
@@ -624,12 +626,6 @@
       sizeof(const char *));
     /* send message to caster */
-    szSendBuffer[0] = '\0';
-    sprintf(szSendBuffer, "SOURCE %s /%s\r\n", password, mountpoint);
-    strcat(szSendBuffer, "Source-Agent: ");
-    strcat(szSendBuffer, VERSION);
-    strcat(szSendBuffer, "\r\n");
-    strcat(szSendBuffer, "\r\n");
-    strcat(szSendBuffer, "\0");
-    nBufferBytes = strlen(szSendBuffer);
+    nBufferBytes = sprintf(szSendBuffer, "SOURCE %s /%s\r\nSource-Agent: "
+    VERSION "\r\n\r\n", password, mountpoint);
     if((send(sock_id, szSendBuffer, (size_t)nBufferBytes, 0)) != nBufferBytes)
     {
Index: /trunk/rtcm3torinex/rtcm3torinex.c
===================================================================
--- /trunk/rtcm3torinex/rtcm3torinex.c	(revision 338)
+++ /trunk/rtcm3torinex/rtcm3torinex.c	(revision 339)
@@ -1,5 +1,5 @@
 /*
   Converter for RTCM3 data to RINEX.
-  $Id: rtcm3torinex.c,v 1.12 2006/11/23 14:39:50 stoecker Exp $
+  $Id: rtcm3torinex.c,v 1.13 2006/11/24 09:53:42 stoecker Exp $
   Copyright (C) 2005-2006 by Dirk Stoecker <stoecker@euronik.eu>
 
@@ -51,5 +51,5 @@
 
 /* CVS revision and version */
-static char revisionstr[] = "$Revision: 1.12 $";
+static char revisionstr[] = "$Revision: 1.13 $";
 
 static uint32_t CRC24(long size, const unsigned char *buf)
@@ -990,5 +990,5 @@
 
 #ifndef NO_RTCM3_MAIN
-static char datestr[]     = "$Date: 2006/11/23 14:39:50 $";
+static char datestr[]     = "$Date: 2006/11/24 09:53:42 $";
 
 /* The string, which is send as agent in HTTP request */
@@ -1334,12 +1334,14 @@
         exit(1);
       }
-      i += encode(buf+i, MAXDATASIZE-i-5, args.user, args.password);
-      if(i > MAXDATASIZE-5)
+      i += encode(buf+i, MAXDATASIZE-i-4, args.user, args.password);
+      if(i > MAXDATASIZE-4)
       {
         RTCM3Error("Username and/or password too long\n");
         exit(1);
       }
-      snprintf(buf+i, 5, "\r\n\r\n");
-      i += 5;
+      buf[i++] = '\r';
+      buf[i++] = '\n';
+      buf[i++] = '\r';
+      buf[i++] = '\n';
     }
     if(send(sockfd, buf, (size_t)i, 0) != i)
