Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
mailutils
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
d0dca5ed
...
d0dca5ed5bbb55713faf157a4259a85a4b6c3527
authored
2003-09-05 11:43:48 +0000
by
Wojciech Polak
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
(tickets_default): New variable.
(main): Check the tickets_default.
1 parent
aabcab59
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
sieve/sieve.c
sieve/sieve.c
View file @
d0dca5e
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Copyright (C) 1999, 2000, 2001, 2002
, 2003
Free Software Foundation, Inc.
GNU Mailutils is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
...
...
@@ -97,6 +97,7 @@ struct options {
int
compile_only
;
char
*
mbox
;
char
*
tickets
;
int
tickets_default
;
int
debug_level
;
int
sieve_debug
;
int
verbose
;
...
...
@@ -113,7 +114,10 @@ parser (int key, char *arg, struct argp_state *state)
{
case
ARGP_KEY_INIT
:
if
(
!
opts
->
tickets
)
{
opts
->
tickets
=
mu_tilde_expansion
(
"~/.tickets"
,
"/"
,
NULL
);
opts
->
tickets_default
=
1
;
}
if
(
!
opts
->
debug_level
)
opts
->
debug_level
=
MU_DEBUG_ERROR
;
log_facility
=
0
;
...
...
@@ -150,6 +154,7 @@ parser (int key, char *arg, struct argp_state *state)
case
't'
:
free
(
opts
->
tickets
);
opts
->
tickets
=
mu_tilde_expansion
(
arg
,
"/"
,
NULL
);
opts
->
tickets_default
=
0
;
break
;
case
'd'
:
...
...
@@ -367,17 +372,21 @@ main (int argc, char *argv[])
/* Create a ticket, if we can. */
if
(
opts
.
tickets
)
{
if
((
rc
=
wicket_create
(
&
wicket
,
opts
.
tickets
))
!
=
0
)
if
((
rc
=
wicket_create
(
&
wicket
,
opts
.
tickets
))
=
=
0
)
{
mu_error
(
_
(
"wicket_create <%s> failed: %s"
),
opts
.
tickets
,
mu_strerror
(
rc
));
goto
cleanup
;
}
if
((
rc
=
wicket_get_ticket
(
wicket
,
&
ticket
,
0
,
0
))
!=
0
)
{
mu_error
(
_
(
"ticket_get failed: %s"
),
mu_strerror
(
rc
));
goto
cleanup
;
}
}
else
if
(
!
(
opts
.
tickets_default
&&
errno
==
ENOENT
))
{
mu_error
(
_
(
"wicket_create <%s> failed: %s"
),
opts
.
tickets
,
mu_strerror
(
rc
));
goto
cleanup
;
}
if
(
ticket
)
sieve_set_ticket
(
mach
,
ticket
);
}
...
...
Please
register
or
sign in
to post a comment