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
fef15057
Commit
fef15057
authored
Aug 11, 2003
by
Per Cederqvist
Browse files
(backdate_comment_link): New debug request.
parent
533117df
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/include/services.h
View file @
fef15057
/*
* $Id: services.h,v 0.6
0
2003/0
7/24 22:05:26
ceder Exp $
* $Id: services.h,v 0.6
1
2003/0
8/11 18:51:11
ceder Exp $
* Copyright (C) 1991-1999, 2001-2002 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
...
...
@@ -692,6 +692,12 @@ extern Success
backdate_text
(
Text_no
text_no
,
unsigned
long
seconds
);
/* Modify the "sent_at" item. It must already exist. */
extern
Success
backdate_comment_link
(
Text_no
parent
,
Text_no
child
,
unsigned
long
seconds
);
extern
Success
start_garb
(
void
);
...
...
src/server/debug.c
View file @
fef15057
/*
* $Id: debug.c,v 1.
8
2003/0
7
/1
5 22:48:25
ceder Exp $
* $Id: debug.c,v 1.
9
2003/0
8
/1
1 18:51:08
ceder Exp $
* Copyright (C) 1991, 1993-1996, 1999, 2001-2002 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
...
...
@@ -49,7 +49,8 @@
#include "connections.h"
#include "services.h"
#include "manipulate.h"
#include "log.h"
#include "lyskomd.h"
#ifdef DEBUG_CALLS
...
...
@@ -119,6 +120,83 @@ backdate_text(Text_no text_no,
return
OK
;
}
extern
Success
backdate_comment_link
(
Text_no
parent
,
Text_no
child
,
unsigned
long
seconds
)
{
Text_stat
*
child_s
;
unsigned
short
nmisc
;
Misc_info
*
misc
;
Bool
in_comm_group
=
FALSE
;
Bool
link_found
=
FALSE
;
CHK_LOGIN
(
FAILURE
);
GET_T_STAT
(
child_s
,
child
,
FAILURE
);
for
(
nmisc
=
child_s
->
no_of_misc
,
misc
=
child_s
->
misc_items
;
nmisc
>
0
;
--
nmisc
,
++
misc
)
{
switch
(
misc
->
type
)
{
case
recpt
:
case
cc_recpt
:
case
bcc_recpt
:
case
comm_in
:
case
footn_in
:
in_comm_group
=
FALSE
;
break
;
case
comm_to
:
case
footn_to
:
in_comm_group
=
(
misc
->
datum
.
text_link
==
parent
);
if
(
in_comm_group
)
link_found
=
TRUE
;
break
;
case
loc_no
:
case
rec_time
:
case
sent_by
:
break
;
case
sent_at
:
if
(
in_comm_group
)
{
misc
->
datum
.
sent_at
-=
seconds
;
mark_text_as_changed
(
child
);
return
OK
;
}
break
;
#ifndef COMPILE_CHECKS
default:
#endif
case
unknown_info
:
restart_kom
(
"backdate_comment_link(): Illegal misc-item.
\n
"
);
}
}
if
(
link_found
)
{
kom_errno
=
KOM_INDEX_OUT_OF_RANGE
;
kom_log
(
"backdate_comment_link(): Test suite error:"
" no sent_at found for parent=%ld, child=%ld
\n
"
,
(
unsigned
long
)
parent
,
(
unsigned
long
)
child
);
}
else
{
kom_errno
=
KOM_NOT_COMMENT
;
kom_log
(
"backdate_comment_link(): Test suite error:"
" %ld is neither comment nor footnote to %ld.
\n
"
,
(
unsigned
long
)
child
,
(
unsigned
long
)
parent
);
}
return
FAILURE
;
}
/* start_garb is in text-garb.c since it needs access to static variables */
#endif
Write
Preview
Markdown
is supported
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