commit 91a13b1d6f016b95bca873dca217de60b741bbeb
parent bdb32ad117305da3375dd4da0302296b6d401db9
Author: cnlohr <charles@cnlohr.com>
Date: Fri, 2 Mar 2018 10:55:15 -0500
Fix processing for URLs
Diffstat:
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/httping.c b/httping.c
@@ -36,6 +36,7 @@ void DoHTTPing( const char * addy, double minperiod, int * seqnoptr, volatile do
int httpsock;
int addylen = strlen(addy);
char hostname[addylen+1];
+ memcpy( hostname, addy, addylen + 1 );
char * eportmarker = strchr( hostname, ':' );
char * eurl = strchr( hostname, '/' );
@@ -44,8 +45,6 @@ void DoHTTPing( const char * addy, double minperiod, int * seqnoptr, volatile do
(*seqnoptr) ++;
HTTPingCallbackStart( *seqnoptr );
- memcpy( hostname, addy, addylen + 1 );
-
if( eportmarker )
{
portno = atoi( eportmarker+1 );