Commit 9bd6c09d authored by Keith Holman's avatar Keith Holman
Browse files

prevent segfault for unknown protocol in test app

This patch updates the source code to not seg fault when an unknown
protocol is specified on the command line in the test app: paho_cs_sub

Previously the output would be:
```
./paho_cs_pub my/topic --host bad://test.mosquitto.org --port 8081
Using topic my/topic
Connecting
Segmentation fault (core dumped)
```

After this patch the output is:
```
./paho_cs_pub my/topic --host bad://test.mosquitto.org

 --port 8081
Using topic my/topic
Connecting
Failed to connect
```

Signed-off-by: default avatarKeith Holman <keith.holman@windriver.com>
parent c897ebac
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment