summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael J. Chudobiak <mjc@avtechpulse.com>2013-01-28 10:35:25 -0500
committerMichael J. Chudobiak <mjc@avtechpulse.com>2013-01-28 10:35:25 -0500
commit4e77d77e5dd1ea4268100bf870c58e45a86cb9ce (patch)
tree92c13ade7f4878c14993dc17762382d650788b87
parent237c74240feecedd4b4206eb4a447736cbcb5a9c (diff)
make vxi feature optional, enable with "diag:eprom:char 225 1"
-rw-r--r--flash.c2
-rw-r--r--globals.h2
-rw-r--r--instr-daemon.c8
-rw-r--r--libvxi11client/perlbits/VXI11-Client.t2
4 files changed, 8 insertions, 6 deletions
diff --git a/flash.c b/flash.c
index bdb8fb2..db5a870 100644
--- a/flash.c
+++ b/flash.c
@@ -391,7 +391,7 @@ static void initFlashValues(FlashStruct *mem)
mem->ChanKey_Burst_Count=0;
mem->ChanKey_Burst_Time=0;
- mem->network_enabled=0;
+ mem->vxi_enabled=0;
mem->self_cal=0;
mem->self_cal_interval=5;
mem->self_cal_startups=0;
diff --git a/globals.h b/globals.h
index 805e7aa..6840edb 100644
--- a/globals.h
+++ b/globals.h
@@ -435,7 +435,7 @@ typedef struct {
char ChanKey_Burst_Time; /* 224 */
- char network_enabled; /* 225 */
+ char vxi_enabled; /* 225 */
short web_session_timeout; /* 226 - timeout in seconds */
diff --git a/instr-daemon.c b/instr-daemon.c
index e1d5c8e..e110863 100644
--- a/instr-daemon.c
+++ b/instr-daemon.c
@@ -294,9 +294,11 @@ int main(int argc, char **argv)
g_timeout_add (20, (GSourceFunc) periodic_poll, NULL);
g_timeout_add (100, (GSourceFunc) finish_boot, NULL);
- GThread *vxithread =g_thread_create(vxithreadfunc, NULL,false, NULL);
- if(vxithread == NULL)
- printf("Couldn't create vxi thread\n");
+ if (globals.Flash.vxi_enabled) {
+ GThread *vxithread =g_thread_create(vxithreadfunc, NULL,false, NULL);
+ if(vxithread == NULL)
+ printf("Couldn't create vxi thread\n");
+ }
g_main_loop_run (loop);
diff --git a/libvxi11client/perlbits/VXI11-Client.t b/libvxi11client/perlbits/VXI11-Client.t
index 96d030b..695540e 100644
--- a/libvxi11client/perlbits/VXI11-Client.t
+++ b/libvxi11client/perlbits/VXI11-Client.t
@@ -18,7 +18,7 @@ BEGIN { use_ok('VXI11::Client') };
&VXI11::Client::vxi_startinterruptserver();
-my $address = "roi";
+my $address = "192.168.0.62";
my $instr = &VXI11::Client::vxi_open($address, 0);
is($instr->vxi_lock(0), 1, "Lock");