- Timestamp:
- Aug 1, 2019, 9:23:25 AM (6 years ago)
- Location:
- trunk/ntripserver
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ntripserver/README
r2277 r8784 3 3 ---------------------------------------------------------------------- 4 4 5 (c) German Federal Agency for Cartography and Geodesy (BKG), 2002-20 075 (c) German Federal Agency for Cartography and Geodesy (BKG), 2002-2019 6 6 7 7 … … 213 213 Further information 214 214 ------------------- 215 URL: http ://igs.bkg.bund.de/index_ntrip.htm215 URL: https://igs.bkg.bund.de/ntrip/index 216 216 E-mail: euref-ip@bkg.bund.de -
trunk/ntripserver/ntripserver.c
-
Property svn:keywords
set to
Id Revision Date
r2276 r8784 1 1 /* 2 * $Id : ntripserver.c,v 1.50 2010/01/21 09:00:49 stoecker Exp$2 * $Id$ 3 3 * 4 * Copyright (c) 2003...20 074 * Copyright (c) 2003...2019 5 5 * German Federal Agency for Cartography and Geodesy (BKG) 6 * Dirk Stöcker (Alberding GmbH) 6 7 * 7 8 * Developed for Networked Transport of RTCM via Internet Protocol (NTRIP) … … 16 17 * 17 18 * For latest information and updates, access: 18 * http ://igs.bkg.bund.de/index_ntrip_down.htm19 * https://igs.bkg.bund.de/ntrip/index 19 20 * 20 * BKG, Frankfurt, Germany, February 200721 * BKG, Frankfurt, Germany, August 2019 21 22 * E-mail: euref-ip@bkg.bund.de 22 23 * … … 31 32 * GNU General Public License for more details. 32 33 * 33 * You should have received a copy of the GNU General Public License 34 * along with this program; if not, write to the Free Software35 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,USA.34 * You should have received a copy of the GNU General Public License along 35 * with this program; if not, write to the Free Software Foundation, Inc., 36 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 36 37 */ 37 38 38 /* CVSrevision and version */39 static char revisionstr[] = "$Revision : 1.50$";40 static char datestr[] = "$Date : 2010/01/21 09:00:49$";39 /* SVN revision and version */ 40 static char revisionstr[] = "$Revision$"; 41 static char datestr[] = "$Date$"; 41 42 42 43 #include <ctype.h> … … 241 242 242 243 { 243 char *a; 244 int i = 0; 245 for(a = revisionstr+11; *a && *a != ' '; ++a) 246 revisionstr[i++] = *a; 247 revisionstr[i] = 0; 248 datestr[0] = datestr[7]; 249 datestr[1] = datestr[8]; 250 datestr[2] = datestr[9]; 251 datestr[3] = datestr[10]; 252 datestr[5] = datestr[12]; 253 datestr[6] = datestr[13]; 254 datestr[8] = datestr[15]; 255 datestr[9] = datestr[16]; 256 datestr[4] = datestr[7] = '-'; 257 datestr[10] = 0; 244 char *a; 245 int i = 2; 246 strcpy(revisionstr, "1."); 247 for(a = revisionstr+11; *a && *a != ' '; ++a) 248 revisionstr[i++] = *a; 249 revisionstr[i] = 0; 250 i = 0; 251 for(a = datestr+7; *a && *a != ' '; ++a) 252 datestr[i++] = *a; 253 datestr[i] = 0; 258 254 } 259 255 … … 1372 1368 char szSendBuffer[BUFSZ] = ""; 1373 1369 int nBufferBytes = 0; 1370 int remainChunk = 0; 1374 1371 1375 1372 /* RTSP / RTP Mode */ … … 1590 1587 else if((nBufferBytes) && (outmode == HTTP)) 1591 1588 { 1592 int i, nChunkBytes, j = 1; 1593 nChunkBytes = snprintf(szSendBuffer, sizeof(szSendBuffer),"%x\r\n", 1594 nBufferBytes); 1595 send(sock, szSendBuffer, nChunkBytes, MSG_DONTWAIT); 1596 if((i = send(sock, buffer, (size_t)nBufferBytes, MSG_DONTWAIT)) 1597 != nBufferBytes) 1598 { 1589 if(remainChunk) 1590 { 1591 int i = send(sock, buffer, (size_t)remainChunk, MSG_DONTWAIT); 1599 1592 if(i < 0) 1600 1593 { … … 1607 1600 else if(i) 1608 1601 { 1609 while(j>0) 1610 { 1611 j = send(sock, buffer, (size_t)BUFSZ, MSG_DONTWAIT); 1612 } 1602 memmove(buffer, buffer+i, (size_t)(nBufferBytes-i)); 1603 nBufferBytes -= i; 1604 remainChunk -= i; 1613 1605 } 1614 1606 } 1615 1607 else 1608 { 1609 int i, nChunkBytes; 1610 nChunkBytes = snprintf(szSendBuffer, sizeof(szSendBuffer),"%x\r\n", 1611 nBufferBytes); 1612 send(sock, szSendBuffer, nChunkBytes, 0); 1613 if((i = send(sock, buffer, (size_t)nBufferBytes, MSG_DONTWAIT)) 1614 != nBufferBytes) 1615 { 1616 if(i < 0) 1617 { 1618 if(errno != EAGAIN) 1619 { 1620 perror("WARNING: could not send data to Destination caster"); 1621 return; 1622 } 1623 } 1624 else if(i) 1625 { 1626 memmove(buffer, buffer+i, (size_t)(nBufferBytes-i)); 1627 nBufferBytes -= i; 1628 remainChunk = nBufferBytes; 1629 } 1630 } 1631 } 1632 if(!remainChunk) 1616 1633 { 1617 1634 send(sock, "\r\n", strlen("\r\n"), MSG_DONTWAIT); -
Property svn:keywords
set to
Note:
See TracChangeset
for help on using the changeset viewer.