Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
6
66
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
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
Eric Vidal
66
Commits
36c17cd1
Commit
36c17cd1
authored
2 years ago
by
Eric Vidal
Browse files
Options
Downloads
Patches
Plain Diff
be shorter at call of tree_sethome
parent
ab655307
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
src/lib66/parse/parse_frontend.c
+18
-14
18 additions, 14 deletions
src/lib66/parse/parse_frontend.c
with
18 additions
and
14 deletions
src/lib66/parse/parse_frontend.c
+
18
−
14
View file @
36c17cd1
...
...
@@ -45,7 +45,7 @@ static void parse_service_instance(stralloc *frontend, char const *svsrc, char c
if
(
!
instance_splitname
(
&
sa
,
sv
,
insta
,
SS_INSTANCE_TEMPLATE
))
log_die
(
LOG_EXIT_SYS
,
"split instance service of: "
,
sv
)
;
log_trace
(
"read frontend service of: "
,
svsrc
,
s
a
.
s
)
;
log_trace
(
"read frontend service of: "
,
svsrc
,
s
v
)
;
if
(
read_svfile
(
frontend
,
sa
.
s
,
svsrc
)
<=
0
)
log_dieusys
(
LOG_EXIT_SYS
,
"read frontend service of: "
,
svsrc
,
sa
.
s
)
;
...
...
@@ -62,12 +62,20 @@ static void set_info(ssexec_t *info)
log_flow
()
;
info
->
tree
.
len
=
0
;
int
r
=
ssexec_set_treeinfo
(
info
)
;
if
(
r
==
-
4
)
log_die
(
LOG_EXIT_USER
,
"You're not allowed to use the tree: "
,
info
->
tree
.
s
)
;
if
(
r
==
-
3
)
log_dieu
(
LOG_EXIT_USER
,
"find the current tree. You must use the -t options"
)
;
if
(
r
==
-
2
)
log_dieu
(
LOG_EXIT_USER
,
"set the tree name"
)
;
if
(
r
==
-
1
)
log_dieu
(
LOG_EXIT_USER
,
"parse seed file"
)
;
if
(
!
r
)
log_dieusys
(
LOG_EXIT_SYS
,
"find tree: "
,
info
->
treename
.
s
)
;
int
r
=
tree_sethome
(
info
)
;
if
(
r
==
-
3
)
log_dieu
(
LOG_EXIT_USER
,
"find the current tree. You must use the -t options"
)
;
else
if
(
r
==
-
2
)
log_dieu
(
LOG_EXIT_USER
,
"set the tree name"
)
;
else
if
(
r
==
-
1
)
log_dieu
(
LOG_EXIT_USER
,
"parse seed file"
)
;
else
if
(
!
r
)
log_dieusys
(
LOG_EXIT_SYS
,
"find tree: "
,
info
->
treename
.
s
)
;
if
(
!
tree_get_permissions
(
info
->
tree
.
s
,
info
->
owner
))
log_die
(
LOG_EXIT_USER
,
"You're not allowed to use the tree: "
,
info
->
tree
.
s
)
;
info
->
treeallow
=
1
;
}
...
...
@@ -116,11 +124,7 @@ int parse_frontend(char const *sv, resolve_service_t *ares, unsigned int *aresle
insta
=
instance_check
(
svname
)
;
if
(
!
insta
)
{
log_die
(
LOG_EXIT_SYS
,
"invalid instance name: "
,
svname
)
;
}
else
if
(
insta
>
0
)
{
if
(
insta
>
0
)
{
parse_service_instance
(
&
sa
,
svsrc
,
svname
,
insta
)
;
...
...
@@ -137,7 +141,7 @@ int parse_frontend(char const *sv, resolve_service_t *ares, unsigned int *aresle
isparsed
=
service_is_g
(
atree
,
svname
,
STATE_FLAGS_ISPARSED
)
;
if
(
isparsed
==
-
1
)
log_dieusys
(
LOG_EXIT_SYS
,
"get information of service: "
,
svname
,
" -- please a bug report"
)
;
log_dieusys
(
LOG_EXIT_SYS
,
"get information of service: "
,
svname
,
" -- please
make
a bug report"
)
;
if
(
isparsed
)
{
...
...
@@ -244,7 +248,7 @@ int parse_frontend(char const *sv, resolve_service_t *ares, unsigned int *aresle
if
(
service_resolve_array_search
(
ares
,
*
areslen
,
svname
)
<
0
)
{
if
(
*
areslen
>=
SS_MAX_SERVICE
)
log_die
(
LOG_EXIT_SYS
,
"to many service to parse -- compile again 66 changing the --max-service options"
)
;
log_die
(
LOG_EXIT_SYS
,
"to
o
many service
s
to parse -- compile again 66 changing the --max-service options"
)
;
(
*
residx
)
=
*
areslen
;
ares
[(
*
areslen
)
++
]
=
res
;
}
...
...
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