X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?p=sim%2Fo1-interface.git;a=blobdiff_plain;f=ntsimulator%2Fsrc%2Fntsimulator-manager%2Fsimulator-operations.c;h=11bd9ff5d2d54bd96e03b0febacafe002c8d5c0b;hp=6d02c01b33a7be16993aaf04c2da64efd75f1b57;hb=223f6b0c729f17d03f41fdbe69c4a8097ea79c03;hpb=3472441e3d90935c770f84c449b6541784afd6a5 diff --git a/ntsimulator/src/ntsimulator-manager/simulator-operations.c b/ntsimulator/src/ntsimulator-manager/simulator-operations.c index 6d02c01..11bd9ff 100644 --- a/ntsimulator/src/ntsimulator-manager/simulator-operations.c +++ b/ntsimulator/src/ntsimulator-manager/simulator-operations.c @@ -755,7 +755,7 @@ static int send_mount_device(device_t *current_device, controller_t controller_d bool is_mounted = true; int port = 0; - char device_name[100]; + char device_name[200]; sprintf(device_name, "%s-%d", getenv("CONTAINER_NAME"), current_device->device_number); //This is where we hardcoded: 7 devices will have SSH connections and 3 devices will have TLS connections @@ -2511,7 +2511,7 @@ static int start_device_notification(char *exec_id) curl_easy_reset(curl); set_curl_common_info(); - char url[100]; + char url[500]; sprintf(url, "http:/v%s/exec/%s/start", getenv("DOCKER_ENGINE_VERSION"), exec_id); curl_easy_setopt(curl, CURLOPT_URL, url); @@ -2590,7 +2590,7 @@ static int inspect_device_notification_execution(char *exec_id) curl_easy_reset(curl); set_curl_common_info(); - char url[100]; + char url[500]; sprintf(url, "http:/v%s/exec/%s/json", getenv("DOCKER_ENGINE_VERSION"), exec_id); curl_easy_setopt(curl, CURLOPT_URL, url); @@ -2645,7 +2645,7 @@ int invoke_device_notification(char *device_id, char *module_name, char *notific curl_easy_reset(curl); set_curl_common_info(); - char url[100]; + char url[300]; sprintf(url, "http:/v%s/containers/%s/exec", getenv("DOCKER_ENGINE_VERSION"), device_id); curl_easy_setopt(curl, CURLOPT_URL, url); @@ -2703,7 +2703,8 @@ int invoke_device_notification(char *device_id, char *module_name, char *notific cJSON *cmd_string_2 = cJSON_CreateString("-c"); cJSON_AddItemToArray(cmd_array, cmd_string_2); - char string_command[500]; + //some notifications require a really long notification object + char string_command[1000000]; sprintf(string_command, "/usr/local/bin/generic-notifications %s '%s'", module_name, notification_string); cJSON *cmd_string_3 = cJSON_CreateString(string_command); @@ -2799,6 +2800,8 @@ int pull_docker_image_of_simulated_device() curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *)&curl_response_mem); + curl_easy_setopt(curl, CURLOPT_TIMEOUT, 300L); + res = curl_easy_perform(curl); if (res != CURLE_OK)