diff options
-rw-r--r-- | src/rps/gnunet-rps-profiler.c | 2 | ||||
-rw-r--r-- | src/rps/test_rps.conf | 23 | ||||
-rw-r--r-- | src/util/disk.c | 21 |
3 files changed, 31 insertions, 15 deletions
diff --git a/src/rps/gnunet-rps-profiler.c b/src/rps/gnunet-rps-profiler.c index ef67aa949..b43ce2fa2 100644 --- a/src/rps/gnunet-rps-profiler.c +++ b/src/rps/gnunet-rps-profiler.c | |||
@@ -2691,7 +2691,7 @@ main (int argc, char *argv[]) | |||
2691 | GNUNET_GETOPT_option_relative_time ('t', | 2691 | GNUNET_GETOPT_option_relative_time ('t', |
2692 | "timeout", | 2692 | "timeout", |
2693 | "TIMEOUT", | 2693 | "TIMEOUT", |
2694 | gettext_noop ("timeout for DHT PUT and GET requests (default: 1 min)"), | 2694 | gettext_noop ("timeout for the profiling"), |
2695 | &timeout), | 2695 | &timeout), |
2696 | 2696 | ||
2697 | GNUNET_GETOPT_option_uint ('r', | 2697 | GNUNET_GETOPT_option_uint ('r', |
diff --git a/src/rps/test_rps.conf b/src/rps/test_rps.conf index 77a0df2c5..05bb9f444 100644 --- a/src/rps/test_rps.conf +++ b/src/rps/test_rps.conf | |||
@@ -21,17 +21,24 @@ FILENAME_VALID_PEERS = $GNUNET_DATA_HOME/rps/valid_peers.txt | |||
21 | # So, 50 is enough for a network of size 50^3 = 125000 | 21 | # So, 50 is enough for a network of size 50^3 = 125000 |
22 | MINSIZE = 4 | 22 | MINSIZE = 4 |
23 | 23 | ||
24 | |||
25 | |||
24 | [testbed] | 26 | [testbed] |
25 | HOSTNAME = localhost | 27 | HOSTNAME = localhost |
26 | 28 | ||
27 | # OPERATION_TIMEOUT = 60 s | ||
28 | |||
29 | # MAX_PARALLEL_TOPOLOGY_CONFIG_OPERATIONS = 100 | 29 | # MAX_PARALLEL_TOPOLOGY_CONFIG_OPERATIONS = 100 |
30 | OVERLAY_TOPOLOGY = CLIQUE | ||
31 | #OVERLAY_TOPOLOGY = SMALL_WORLD | ||
32 | #SCALE_FREE_TOPOLOGY_CAP = | ||
33 | 30 | ||
34 | # OVERLAY_RANDOM_LINKS = 25 | 31 | #OVERLAY_TOPOLOGY = CLIQUE |
32 | |||
33 | OVERLAY_TOPOLOGY = SCALE_FREE | ||
34 | SCALE_FREE_TOPOLOGY_CAP = 100 | ||
35 | SCALE_FREE_TOPOLOGY_M = 2 | ||
36 | |||
37 | #OVERLAY_TOPOLOGY = RANDOM | ||
38 | #OVERLAY_RANDOM_LINKS = 25 | ||
39 | |||
40 | #OVERLAY_TOPOLOGY = SMALL_WORLD | ||
41 | #OVERLAY_RANDOM_LINKS = 25 | ||
35 | 42 | ||
36 | SETUP_TIMEOUT = 2 m | 43 | SETUP_TIMEOUT = 2 m |
37 | 44 | ||
@@ -41,12 +48,13 @@ WORKBITS = 0 | |||
41 | [nat] | 48 | [nat] |
42 | # Use addresses from the local network interfaces (inluding loopback, but also others) | 49 | # Use addresses from the local network interfaces (inluding loopback, but also others) |
43 | USE_LOCALADDR = YES | 50 | USE_LOCALADDR = YES |
51 | ENABLE_UPNP = NO | ||
44 | 52 | ||
45 | # Do we use addresses from localhost address ranges? (::1, 127.0.0.0/8) | 53 | # Do we use addresses from localhost address ranges? (::1, 127.0.0.0/8) |
46 | RETURN_LOCAL_ADDRESSES = YES | 54 | RETURN_LOCAL_ADDRESSES = YES |
47 | 55 | ||
48 | [transport] | 56 | [transport] |
49 | PLUGINS = udp | 57 | PLUGINS = unix |
50 | 58 | ||
51 | [ats] | 59 | [ats] |
52 | # Network specific inbound/outbound quotas | 60 | # Network specific inbound/outbound quotas |
@@ -72,7 +80,6 @@ BLUETOOTH_QUOTA_OUT = unlimited | |||
72 | DISABLE_TRY_CONNECT = YES | 80 | DISABLE_TRY_CONNECT = YES |
73 | 81 | ||
74 | [cadet] | 82 | [cadet] |
75 | DISABLE_TRY_CONNECT = YES | ||
76 | #OPTIONS=-l /tmp/rps_profiler_logs/cadet-[]-%Y-%m-%d.log | 83 | #OPTIONS=-l /tmp/rps_profiler_logs/cadet-[]-%Y-%m-%d.log |
77 | #PREFIX = valgrind | 84 | #PREFIX = valgrind |
78 | 85 | ||
diff --git a/src/util/disk.c b/src/util/disk.c index 31e8f12c6..e0227be70 100644 --- a/src/util/disk.c +++ b/src/util/disk.c | |||
@@ -830,6 +830,12 @@ GNUNET_DISK_directory_create_for_file (const char *filename) | |||
830 | errno = EINVAL; | 830 | errno = EINVAL; |
831 | return GNUNET_SYSERR; | 831 | return GNUNET_SYSERR; |
832 | } | 832 | } |
833 | if (0 == ACCESS (rdir, W_OK)) | ||
834 | { | ||
835 | GNUNET_free (rdir); | ||
836 | return GNUNET_OK; | ||
837 | } | ||
838 | |||
833 | len = strlen (rdir); | 839 | len = strlen (rdir); |
834 | while ((len > 0) && (rdir[len] != DIR_SEPARATOR)) | 840 | while ((len > 0) && (rdir[len] != DIR_SEPARATOR)) |
835 | len--; | 841 | len--; |
@@ -1686,16 +1692,19 @@ GNUNET_DISK_file_open (const char *fn, | |||
1686 | return NULL; | 1692 | return NULL; |
1687 | } | 1693 | } |
1688 | if (flags & GNUNET_DISK_OPEN_FAILIFEXISTS) | 1694 | if (flags & GNUNET_DISK_OPEN_FAILIFEXISTS) |
1689 | oflags |= (O_CREAT | O_EXCL); | 1695 | oflags |= (O_CREAT | O_EXCL); |
1690 | if (flags & GNUNET_DISK_OPEN_TRUNCATE) | 1696 | if (flags & GNUNET_DISK_OPEN_TRUNCATE) |
1691 | oflags |= O_TRUNC; | 1697 | oflags |= O_TRUNC; |
1692 | if (flags & GNUNET_DISK_OPEN_APPEND) | 1698 | if (flags & GNUNET_DISK_OPEN_APPEND) |
1693 | oflags |= O_APPEND; | 1699 | oflags |= O_APPEND; |
1694 | if (flags & GNUNET_DISK_OPEN_CREATE) | 1700 | if(GNUNET_NO == GNUNET_DISK_file_test(fn)) |
1695 | { | 1701 | { |
1696 | (void) GNUNET_DISK_directory_create_for_file (expfn); | 1702 | if (flags & GNUNET_DISK_OPEN_CREATE ) |
1697 | oflags |= O_CREAT; | 1703 | { |
1698 | mode = translate_unix_perms (perm); | 1704 | (void) GNUNET_DISK_directory_create_for_file (expfn); |
1705 | oflags |= O_CREAT; | ||
1706 | mode = translate_unix_perms (perm); | ||
1707 | } | ||
1699 | } | 1708 | } |
1700 | 1709 | ||
1701 | fd = open (expfn, oflags | 1710 | fd = open (expfn, oflags |