+ *connect_host = 0;
+ if (strncmp(uri, "connect:", 8) == 0)
+ {
+ const char *cp = strchr(uri, ',');
+ if (cp)
+ {
+ size_t len = cp - (uri + 8);
+ *connect_host = (char *) xmalloc(len+1);
+ memcpy(*connect_host, uri + 8, len);
+ (*connect_host)[len] = '\0';
+ uri = cp+1;
+ }
+ }