aboutsummaryrefslogtreecommitdiff
path: root/libbb/atlas_probe.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/atlas_probe.c')
-rw-r--r--libbb/atlas_probe.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libbb/atlas_probe.c b/libbb/atlas_probe.c
index a3264fb..8a5c8f0 100644
--- a/libbb/atlas_probe.c
+++ b/libbb/atlas_probe.c
@@ -6,13 +6,17 @@
#include "libbb.h"
int get_probe_id(void)
{
- int probe_id;
+ static int probe_id= -1;
+
size_t len;
char *check;
const char *key;
FILE *fp;
char buf[80];
+ if (probe_id > 0)
+ return probe_id; /* Assume probe ID never changes */
+
fp= fopen("/home/atlas/status/reg_init_reply.txt", "r");
if (!fp)
return -1;