Code

store, plugin: Let the plugin module determine an objects backends.
[sysdb.git] / src / client / sock.c
index 838dd95d880debea45d0549c5fde06be776308c1..b1efe58e189700fd46c7b77b46c55278c39a150d 100644 (file)
@@ -187,7 +187,7 @@ connect_tcp(sdb_client_t *client, const char *address)
        }
 
        strncpy(host, address, sizeof(host));
-       if ((tmp = strchr(host, (int)':')))
+       if ((tmp = strrchr(host, (int)':')))
                *tmp = '\0';
        if (! host[0])
                strncpy(host, "localhost", sizeof(host));