Procházet zdrojové kódy

Merge branch 'master' of github.com:acplt/open62541

Julius Pfrommer před 9 roky
rodič
revize
94ce69b443
3 změnil soubory, kde provedl 4 přidání a 1 odebrání
  1. 2 0
      .travis.yml
  2. 1 1
      README.md
  3. 1 0
      examples/networklayer_tcp.c

+ 2 - 0
.travis.yml

@@ -50,6 +50,8 @@ script:
 - make -j
 - tar -pczf open62541-linux64.tar.gz ../README.md exampleServer exampleClient libopen62541.so open62541.h open62541.c
 - cp open62541-linux64.tar.gz ..
+- cp open62541.h .. #copy single file-release
+- cp open62541.c .. #copy single file-release
 - cd .. && rm build -rf && mkdir -p build && cd build
 - echo "Upgrade to gcc 4.8"
 - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y

+ 1 - 1
README.md

@@ -26,7 +26,7 @@ As an open source project, we invite new contributors to help improving open6254
 - Work on issues marked as "[easy hacks](https://github.com/acplt/open62541/labels/easy%20hack)"
 
 ### Example Server Implementation
-Compile the examples with the single [header](http://open62541.org/open62541.h) and [source](http://open62541.org/open62541.c) file distribution generated from the library source.
+Compile the examples with the single file distribution `open62541.h` and `open62541.c` from the latest [release](https://github.com/acplt/open62541/releases).
 With the GCC compiler, just run ```gcc -std=c99 <server.c> open62541.c -o server```.
 ```c
 #include <signal.h>

+ 1 - 0
examples/networklayer_tcp.c

@@ -453,6 +453,7 @@ static UA_StatusCode ClientNetworkLayerTCP_connect(const UA_String endpointUrl,
 
     //this is somewhat ugly, but atoi needs a c string
     char cstringEndpointUrl[endpointUrl.length+1];
+    memset(cstringEndpointUrl, 0, endpointUrl.length+1);
     memcpy(cstringEndpointUrl, endpointUrl.data, endpointUrl.length);
     cstringEndpointUrl[endpointUrl.length+1] = '0';