Skip to content
GitLab
Menu
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
6952e7e1
Commit
6952e7e1
authored
Aug 13, 2003
by
Per Cederqvist
Browse files
(find_next_conf_no): New function.
(find_previous_conf_no): New function.
parent
51e0d607
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/include/services.h
View file @
6952e7e1
/*
* $Id: services.h,v 0.6
3
2003/08/1
2 22:32:51
ceder Exp $
* $Id: services.h,v 0.6
4
2003/08/1
3 10:28:23
ceder Exp $
* Copyright (C) 1991-1999, 2001-2002 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
...
...
@@ -409,6 +409,15 @@ set_keep_commented(Conf_no conf_no,
extern
Success
first_unused_conf_no
(
Conf_no
*
result
);
/*
* Return next/previous existing text-no.
*/
extern
Success
find_next_conf_no
(
Conf_no
start
,
Conf_no
*
result
);
extern
Success
find_previous_conf_no
(
Conf_no
start
,
Conf_no
*
result
);
/********************************
* Calls to handle marks *
...
...
src/server/conference.c
View file @
6952e7e1
/*
* $Id: conference.c,v 0.8
5
2003/08/1
2 22:32:37
ceder Exp $
* $Id: conference.c,v 0.8
6
2003/08/1
3 10:28:20
ceder Exp $
* Copyright (C) 1991-2002 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
...
...
@@ -1536,3 +1536,50 @@ first_unused_conf_no(Conf_no *result)
*
result
=
query_next_conf_no
();
return
OK
;
}
Success
find_next_conf_no
(
Conf_no
start
,
Conf_no
*
result
)
{
Conf_no
highest
=
query_next_conf_no
();
CHK_CONNECTION
(
FAILURE
);
CHK_LOGIN
(
FAILURE
);
err_stat
=
start
;
while
(
++
start
<
highest
)
if
(
has_access
(
start
,
active_connection
,
read_protected
))
{
*
result
=
start
;
return
OK
;
}
kom_errno
=
KOM_UNDEF_CONF
;
return
FAILURE
;
}
extern
Success
find_previous_conf_no
(
Conf_no
start
,
Conf_no
*
result
)
{
Conf_no
next_cno
;
const
Conf_no
saved_start
=
start
;
CHK_CONNECTION
(
FAILURE
);
CHK_LOGIN
(
FAILURE
);
if
(
start
>
(
next_cno
=
query_next_conf_no
()))
start
=
next_cno
;
while
(
start
--
>
0
)
if
(
has_access
(
start
,
active_connection
,
read_protected
))
{
*
result
=
start
;
return
OK
;
}
kom_errno
=
KOM_UNDEF_CONF
;
err_stat
=
saved_start
;
return
FAILURE
;
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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