added case path null

This commit is contained in:
Pasquale Boemio
2013-04-26 21:52:54 +02:00
parent 2106759d98
commit bfc6fdad62
+2
View File
@@ -265,6 +265,8 @@ WebSocket::pointer WebSocket::from_url(std::string url) {
else if (sscanf(url.c_str(), "ws://%[^/]/%s", host, path) == 2) {
port = 80;
}
else if (sscanf(url.c_str(), "ws://%[^:]:%d", host, &port) == 2) {
}
else {
fprintf(stderr, "ERROR: Could not parse WebSocket url: %s\n", url.c_str());
return NULL;