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
85d30d29
...
85d30d2919f22544355df1d31ba3615d9dc2d4a9
authored
2005-07-26 12:39:19 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
(mailbox_folder_create): New function
(mailbox_create): Use mailbox_folder_create.
1 parent
dee15093
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
2 deletions
mailbox/mailbox.c
mailbox/mailbox.c
View file @
85d30d2
...
...
@@ -40,6 +40,23 @@
#include <mailbox0.h>
int
mailbox_folder_create
(
folder_t
*
pfolder
,
const
char
*
name
)
{
int
rc
;
char
*
p
,
*
fname
=
strdup
(
name
);
if
(
!
fname
)
return
ENOMEM
;
p
=
strrchr
(
fname
,
'/'
);
/* FIXME: Is this always appropriate? */
if
(
p
)
*
p
=
0
;
rc
=
folder_create
(
pfolder
,
fname
);
free
(
fname
);
return
rc
;
}
/* The Mailbox Factory.
Create an iterator for registrar and see if any url scheme match,
Then we call the mailbox's url_create() to parse the URL. Last
...
...
@@ -52,7 +69,7 @@ mailbox_create (mailbox_t *pmbox, const char *name)
if
(
pmbox
==
NULL
)
return
MU_ERR_OUT_PTR_NULL
;
if
(
registrar_lookup
(
name
,
&
record
)
==
0
)
if
(
registrar_lookup
(
name
,
&
record
,
MU_FOLDER_ATTRIBUTE_FILE
)
)
{
int
(
*
m_init
)
__P
((
mailbox_t
))
=
NULL
;
int
(
*
u_init
)
__P
((
url_t
))
=
NULL
;
...
...
@@ -91,7 +108,7 @@ mailbox_create (mailbox_t *pmbox, const char *name)
/* Create the folder before initializing the concrete mailbox.
The mailbox needs it's back pointer. */
status
=
folder_create
(
&
mbox
->
folder
,
name
);
status
=
mailbox_
folder_create
(
&
mbox
->
folder
,
name
);
if
(
status
==
0
)
status
=
m_init
(
mbox
);
/* Create the concrete mailbox type. */
...
...
Please
register
or
sign in
to post a comment