Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Per Cederqvist
lyskom-server-ceder-1616-generations-topgit
Commits
7e542b42
Commit
7e542b42
authored
Aug 22, 2003
by
Per Cederqvist
Browse files
(map_created_texts_reverse): New request.
parent
6b77ea96
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/server/person.c
View file @
7e542b42
/*
* $Id: person.c,v 0.8
3
2003/08/2
0
0
8:26:06
ceder Exp $
* $Id: person.c,v 0.8
4
2003/08/2
2
0
6:45:02
ceder Exp $
* Copyright (C) 1991-1999, 2001-2002 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
...
...
@@ -930,6 +930,54 @@ map_created_texts(Pers_no pers_no,
}
extern
Success
map_created_texts_reverse
(
Pers_no
pers_no
,
Local_text_no
local_no_ceiling
,
unsigned
long
no_of_texts
,
Text_mapping_reverse
*
result
)
{
Person
*
pers_p
;
enum
access
acc
;
Local_text_no
ceiling
;
CHK_CONNECTION
(
FAILURE
);
if
(
no_of_texts
>
255
)
{
err_stat
=
255
;
kom_errno
=
KOM_LONG_ARRAY
;
return
FAILURE
;
}
GET_P_STAT
(
pers_p
,
pers_no
,
FAILURE
);
CHK_CONNECTION
(
FAILURE
);
CHK_LOGIN
(
FAILURE
);
acc
=
access_perm
(
pers_no
,
active_connection
,
read_protected
);
if
(
acc
==
error
)
return
FAILURE
;
if
(
acc
<=
none
)
{
err_stat
=
pers_no
;
kom_errno
=
KOM_UNDEF_PERS
;
return
FAILURE
;
}
ceiling
=
l2g_first_appendable_key
(
&
pers_p
->
created_texts
);
if
(
local_no_ceiling
==
0
||
local_no_ceiling
>
ceiling
)
result
->
ceiling
=
ceiling
;
else
result
->
ceiling
=
local_no_ceiling
;
result
->
no_of_texts
=
no_of_texts
;
result
->
l2g
=
&
pers_p
->
created_texts
;
return
OK
;
}
/*
* Set privilege bits of a person. You must have the wheel bit set
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment