Add an ASSERT_LOCKED(lock) macro
[lttng-tools.git] / src / common / uri.c
index 380e75dd33b4839b144181c35f341a2724ef0f4e..7fe4dd3b30af4796a855fb28cb83f5f4fca827ce 100644 (file)
@@ -608,7 +608,7 @@ ssize_t uri_parse_str_urls(const char *ctrl_url, const char *data_url,
 
                if (ctrl_uris[0].dtype == LTTNG_DST_PATH &&
                                (data_url && *data_url != '\0')) {
-                       ERR("Can not have a data URL when destination is file://");
+                       ERR("Cannot have a data URL when destination is file://");
                        goto error;
                }
 
@@ -644,10 +644,12 @@ ssize_t uri_parse_str_urls(const char *ctrl_url, const char *data_url,
 
                set_default_uri_attr(&data_uris[0], LTTNG_STREAM_DATA);
 
-               ret = compare_destination(&ctrl_uris[0], &data_uris[0]);
-               if (ret != 0) {
-                       ERR("Control and data destination mismatch");
-                       goto error;
+               if (ctrl_uris) {
+                       ret = compare_destination(&ctrl_uris[0], &data_uris[0]);
+                       if (ret != 0) {
+                               ERR("Control and data destination mismatch");
+                               goto error;
+                       }
                }
        }
 
This page took 0.022957 seconds and 4 git commands to generate.