Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
ee14734c
Commit
ee14734c
authored
9 years ago
by
deuce
Browse files
Options
Downloads
Patches
Plain Diff
Add support for points, and create the outbound directory (using mkpath()) if
it doesn't exist.
parent
c0adae1f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
exec/tickit.js
+15
-4
15 additions, 4 deletions
exec/tickit.js
with
15 additions
and
4 deletions
exec/tickit.js
+
15
−
4
View file @
ee14734c
...
...
@@ -124,10 +124,10 @@ function add_links(seenbys, links, list)
}
}
function
parse_addr
(
addr
)
function
parse_addr
(
addr
,
dz
)
{
var
m
;
var
ret
=
{};
var
ret
=
{
zone
:
dz
,
net
:
0
,
node
:
0
,
point
:
0
};
m
=
addr
.
match
(
/^
([
0-9
]
+
)
:/
);
if
(
m
!==
null
)
...
...
@@ -220,7 +220,7 @@ function forward_tic(tic)
pw
=
''
;
// Figure out the outbound dir...
addr
=
parse_addr
(
link
);
addr
=
parse_addr
(
link
,
defzone
);
if
(
addr
.
zone
===
undefined
)
addr
.
zone
=
defzone
;
...
...
@@ -234,6 +234,14 @@ function forward_tic(tic)
outb
+=
format
(
"
.%03x
"
,
addr
.
zone
);
outb
=
fullpath
(
outb
);
outb
=
backslash
(
outb
);
if
(
addr
.
point
>
0
)
{
outb
+=
format
(
"
%04x%04x.pnt
"
,
addr
.
net
,
addr
.
node
);
outb
=
backslash
(
outb
);
}
if
(
!
mkpath
(
outb
))
{
log
(
LOG_ERROR
,
"
Unable to create outbound director '
"
+
outb
+
"
' for link
"
+
link
);
continue
;
}
// Create TIC file first...
tf
=
new
File
(
outb
+
tickit
.
get_next_tic_filename
());
...
...
@@ -253,7 +261,10 @@ function forward_tic(tic)
tf
.
close
();
// Create bsy file...
flobase
=
outb
+
format
(
"
%04x%04x
"
,
addr
.
net
,
addr
.
node
);
if
(
addr
.
point
>
0
)
flobase
=
outb
+
format
(
"
%08x
"
,
addr
.
point
);
else
flobase
=
outb
+
format
(
"
%04x%04x
"
,
addr
.
net
,
addr
.
node
);
bf
=
new
File
(
flobase
+
'
.bsy
'
);
while
(
!
bf
.
open
(
'
web+
'
))
{
// TODO: This waits forever...
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment