-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdiffs.ltp_start
109 lines (106 loc) · 2.76 KB
/
diffs.ltp_start
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
diff --git a/bpv7/bibe/bibeclo.c b/bpv7/bibe/bibeclo.c
index 0e832e96..2fa071e9 100644
--- a/bpv7/bibe/bibeclo.c
+++ b/bpv7/bibe/bibeclo.c
@@ -571,7 +571,7 @@ int main(int argc, char *argv[])
/* The encapsulating bundle inherits forwarding
* preferences from the encapsulated bundle,
* except the BIBE and CT requests themselves.
- * Other ancillary data items are take from the
+ * Other ancillary data items are taken from the
* bcla as configured by bibeadmin. */
ctRequested = ancillaryData.flags & BP_CT_REQUESTED;
diff --git a/bpv7/utils/bpadmin.c b/bpv7/utils/bpadmin.c
index 949a56e1..1ce75187 100644
--- a/bpv7/utils/bpadmin.c
+++ b/bpv7/utils/bpadmin.c
@@ -1701,15 +1701,13 @@ static int processLine(char *line, int lineLength, int *rc)
if (tokenCount > 1)
{
executeStart(tokenCount, tokens);
+ return 0;
}
- else
+
+ if (bpStart() < 0)
{
- if (bpStart() < 0)
- {
- putErrmsg("Can't start BP.",
- NULL);
- return 0;
- }
+ putErrmsg("Can't start BP.", NULL);
+ return 0;
}
/* Wait for bp to start up. */
diff --git a/ltp/utils/ltpadmin.c b/ltp/utils/ltpadmin.c
index b3c783c1..e4f4d704 100644
--- a/ltp/utils/ltpadmin.c
+++ b/ltp/utils/ltpadmin.c
@@ -95,8 +95,10 @@ See man(5) for ltprc.");
PUTS("\t m maxbacklog <max block delivery backlog; default is 10>");
PUTS("\ts\tStart");
PUTS("\t s ['<LSI command>']");
+ PUTS("\t s span <engine ID#>");
PUTS("\tx\tStop");
PUTS("\t x");
+ PUTS("\t x span <engine ID#>");
PUTS("\tw\tWatch LTP activity");
PUTS("\t w { 0 | 1 | <activity spec> }");
PUTS("\t\tActivity spec is a string of all requested activity \
@@ -952,6 +954,7 @@ static int processLine(char *line, int lineLength, int *checkNeeded,
char *cursor;
int i;
char *tokens[12];
+ uvast engineId;
char lsiCmd[256];
char buffer[80];
struct timeval done_time;
@@ -1025,6 +1028,20 @@ static int processLine(char *line, int lineLength, int *checkNeeded,
{
if (tokenCount > 1)
{
+ if (strcmp(tokens[1], "span") == 0)
+ {
+ if (tokenCount != 3)
+ {
+ SYNTAX_ERROR;
+ return 0;
+ }
+
+ engineId = strtoul(tokens[2],
+ NULL, 0);
+ oK(ltpStartSpan(engineId));
+ return 0;
+ }
+
patchLsiCmd(tokenCount, tokens, lsiCmd);
oK(addSeat(lsiCmd));
}
@@ -1059,6 +1076,26 @@ up, abandoned.");
case 'x':
if (attachToLtp() == 0)
{
+ if (tokenCount > 1)
+ {
+ if (strcmp(tokens[1], "span") == 0)
+ {
+ if (tokenCount != 3)
+ {
+ SYNTAX_ERROR;
+ return 0;
+ }
+
+ engineId = strtoul(tokens[2],
+ NULL, 0);
+ ltpStopSpan(engineId);
+ return 0;
+ }
+
+ SYNTAX_ERROR;
+ return 0;
+ }
+
ltpStop();
}