projects
/
spider.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
38adb61
)
remove -0 on callsigns
author
minima
<minima>
Sat, 28 Oct 2000 19:04:12 +0000
(19:04 +0000)
committer
minima
<minima>
Sat, 28 Oct 2000 19:04:12 +0000
(19:04 +0000)
perl/client.pl
patch
|
blob
|
history
src/client.c
patch
|
blob
|
history
diff --git
a/perl/client.pl
b/perl/client.pl
index 740a9e7211d45bb27c4dfadf8cebe3f0243e0e7c..b84945783155cd70a36685524ab78bf50fd98735 100755
(executable)
--- a/
perl/client.pl
+++ b/
perl/client.pl
@@
-477,6
+477,7
@@
if ($connsort eq "connect") {
setmode();
# adjust the callsign if it has an SSID, SSID <= 8 are legal > 8 are netrom connections
setmode();
# adjust the callsign if it has an SSID, SSID <= 8 are legal > 8 are netrom connections
+$call =~ s/-0$//; # strip off -0 as this is equiv to just call on its own
my ($scall, $ssid) = split /-/, $call;
$ssid = undef unless $ssid && $ssid =~ /^\d+$/;
if ($ssid) {
my ($scall, $ssid) = split /-/, $call;
$ssid = undef unless $ssid && $ssid =~ /^\d+$/;
if ($ssid) {
diff --git
a/src/client.c
b/src/client.c
index 74670241615d1ce8d12fca3fbe3b17b17770b4a2..167ef647acacc5101cf152223117d25e9023f62c 100644
(file)
--- a/
src/client.c
+++ b/
src/client.c
@@
-112,10
+112,10
@@
myregex_t iscallreg[] = { /* regexes to determine whether this is a reasonable
"^[0-9]+[A-Z]+[0-9]+[A-Z]+[1-9]?$", 0 /* 2E0AAA 2E0AAA1 */
},
{
"^[0-9]+[A-Z]+[0-9]+[A-Z]+[1-9]?$", 0 /* 2E0AAA 2E0AAA1 */
},
{
- "^[A-Z]+[0-9]+[A-Z]+-[
1
-9]$", 0 /* G1TLH-2 */
+ "^[A-Z]+[0-9]+[A-Z]+-[
0
-9]$", 0 /* G1TLH-2 */
},
{
},
{
- "^[0-9]+[A-Z]+[0-9]+[A-Z]+-[
1
-9]$", 0 /* 2E0AAA-2 */
+ "^[0-9]+[A-Z]+[0-9]+[A-Z]+-[
0
-9]$", 0 /* 2E0AAA-2 */
},
{
"^[A-Z]+[0-9]+[A-Z]+-1[0-5]$", 0 /* G1TLH-11 */
},
{
"^[A-Z]+[0-9]+[A-Z]+-1[0-5]$", 0 /* G1TLH-11 */
@@
-613,6
+613,11
@@
void process_stdin()
if (!iscallsign(call)) {
die("Sorry, %s isn't a valid callsign", call);
}
if (!iscallsign(call)) {
die("Sorry, %s isn't a valid callsign", call);
}
+
+ /* strip off a '-0' at the end */
+ i = strlen(call);
+ if (call[i-1] == '0' && call[i-2] == '-')
+ call[i-2] = 0;
alarm(0);
signal(SIGALRM, SIG_IGN);
alarm(0);
signal(SIGALRM, SIG_IGN);
@@
-879,12
+884,18
@@
main(int argc, char *argv[])
send_text(in, "login: ", 7, 0);
chgstate(WAITLOGIN);
} else {
send_text(in, "login: ", 7, 0);
chgstate(WAITLOGIN);
} else {
-
+ int i;
+
/* check the callsign against the regexes */
if (!iscallsign(call)) {
die("Sorry, %s isn't a valid callsign", call);
}
/* check the callsign against the regexes */
if (!iscallsign(call)) {
die("Sorry, %s isn't a valid callsign", call);
}
+ /* strip off a '-0' at the end */
+ i = strlen(call);
+ if (call[i-1] == '0' && call[i-2] == '-')
+ call[i-2] = 0;
+
/* tell the cluster who I am */
send_msg(node, 'A', connsort, strlen(connsort));
/* tell the cluster who I am */
send_msg(node, 'A', connsort, strlen(connsort));