summaryrefslogtreecommitdiff
path: root/src/model_generation.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/model_generation.py')
-rw-r--r--src/model_generation.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/model_generation.py b/src/model_generation.py
index da8e272..dcb0788 100644
--- a/src/model_generation.py
+++ b/src/model_generation.py
@@ -268,7 +268,8 @@ class ModelGeneration:
if (fptr)
{
char line[20];
- while(fscanf(fptr, "%s", line) == 1) {
+ int line_port;
+ while(fscanf(fptr, "%s %d\\n", line, &line_port) == 2) {
ip_count++;
}
@@ -284,7 +285,7 @@ class ModelGeneration:
fptr = fopen(ip_filename, "a");
if (fptr)
{
- fprintf(fptr, "%s\\n", my_ip);
+ fprintf(fptr, "%s %d\\n", my_ip, sock_port);
fclose(fptr);
} else {
perror("Client - cannot open Common_IP file ");