Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cta
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dCache
cta
Commits
62253984
Commit
62253984
authored
11 years ago
by
Steven Murray
Browse files
Options
Downloads
Patches
Plain Diff
Moved rmc_log_req() into its own object file
parent
94da6b03
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
h/rmc_logreq.h
+11
-0
11 additions, 0 deletions
h/rmc_logreq.h
rmc/Imakefile
+1
-1
1 addition, 1 deletion
rmc/Imakefile
rmc/rmc_logreq.c
+58
-0
58 additions, 0 deletions
rmc/rmc_logreq.c
rmc/rmc_procreq.c
+1
-48
1 addition, 48 deletions
rmc/rmc_procreq.c
with
71 additions
and
49 deletions
h/rmc_logreq.h
0 → 100644
+
11
−
0
View file @
62253984
/*
* Copyright (C) 2001 by CERN/IT/PDP/DM
* All rights reserved
*/
#ifndef _RMC_LOGREQ_H
#define _RMC_LOGREQ_H 1
void
rmc_logreq
(
const
char
*
const
func
,
char
*
const
logbuf
);
#endif
This diff is collapsed.
Click to expand it.
rmc/Imakefile
+
1
−
1
View file @
62253984
...
...
@@ -11,7 +11,7 @@ include $(CASTOR_ROOT)/tape/Makefile
RMCD_DEPLIBS = DepSharedLibraryTargetName(tape,castortape)
RMCD_LIBS = $(RMCD_DEPLIBS) BuildRPathcastortape
RMCD_OBJS = rmc_serv.o rmc_procreq.o rmc_logit.o rmc_sendrep.o rmc_smcsubr.o rmc_send_scsi_cmd.o
RMCD_OBJS = rmc_serv.o rmc_procreq.o rmc_logit.o
rmc_logreq.o
rmc_sendrep.o rmc_smcsubr.o rmc_send_scsi_cmd.o
TapeProgramTarget(rmcd,$(RMCD_OBJS),$(RMCD_DEPLIBS),$(RMCD_LIBS),755)
ADMMANPAGE(rmcd)
TapeMakeDir($(LOGPATH),0755)
...
...
This diff is collapsed.
Click to expand it.
rmc/rmc_logreq.c
0 → 100644
+
58
−
0
View file @
62253984
/*
* Copyright (C) 2001-2002 by CERN/IT/PDP/DM
* All rights reserved
*/
#include
"h/rmc_constants.h"
#include
"h/rmc_logit.h"
#include
"h/rmc_logreq.h"
#include
"h/tplogger_api.h"
#include
<string.h>
/* rmc_logreq - log a request */
/* Split the message into lines so they don't exceed LOGBUFSZ-1 characters
* A backslash is appended to a line to be continued
* A continuation line is prefixed by '+ '
*/
void
rmc_logreq
(
const
char
*
const
func
,
char
*
const
logbuf
)
{
int
n1
,
n2
;
char
*
p
;
char
savechrs1
[
2
];
char
savechrs2
[
2
];
n1
=
RMC_LOGBUFSZ
-
strlen
(
func
)
-
36
;
n2
=
strlen
(
logbuf
);
p
=
logbuf
;
while
(
n2
>
n1
)
{
savechrs1
[
0
]
=
*
(
p
+
n1
);
savechrs1
[
1
]
=
*
(
p
+
n1
+
1
);
*
(
p
+
n1
)
=
'\\'
;
*
(
p
+
n1
+
1
)
=
'\0'
;
rmc_logit
(
func
,
RMC98
,
p
);
tl_rmcdaemon
.
tl_log
(
&
tl_rmcdaemon
,
98
,
2
,
"func"
,
TL_MSG_PARAM_STR
,
"rmc_logreq"
,
"Request"
,
TL_MSG_PARAM_STR
,
p
);
if
(
p
!=
logbuf
)
{
*
p
=
savechrs2
[
0
];
*
(
p
+
1
)
=
savechrs2
[
1
];
}
p
+=
n1
-
2
;
savechrs2
[
0
]
=
*
p
;
savechrs2
[
1
]
=
*
(
p
+
1
);
*
p
=
'+'
;
*
(
p
+
1
)
=
' '
;
*
(
p
+
2
)
=
savechrs1
[
0
];
*
(
p
+
3
)
=
savechrs1
[
1
];
n2
-=
n1
;
}
rmc_logit
(
func
,
RMC98
,
p
);
tl_rmcdaemon
.
tl_log
(
&
tl_rmcdaemon
,
98
,
2
,
"func"
,
TL_MSG_PARAM_STR
,
"rmc_logreq"
,
"Request"
,
TL_MSG_PARAM_STR
,
p
);
if
(
p
!=
logbuf
)
{
*
p
=
savechrs2
[
0
];
*
(
p
+
1
)
=
savechrs2
[
1
];
}
}
This diff is collapsed.
Click to expand it.
rmc/rmc_procreq.c
+
1
−
48
View file @
62253984
...
...
@@ -17,6 +17,7 @@
#include
"h/serrno.h"
#include
"h/rmc_constants.h"
#include
"h/rmc_logit.h"
#include
"h/rmc_logreq.h"
#include
"h/rmc_smcsubr.h"
#include
"h/rmc_smcsubr2.h"
#include
"h/rmc_sendrep.h"
...
...
@@ -27,54 +28,6 @@
extern
struct
extended_robot_info
extended_robot_info
;
extern
char
localhost
[
CA_MAXHOSTNAMELEN
+
1
];
/* rmc_logreq - log a request */
/* Split the message into lines so they don't exceed LOGBUFSZ-1 characters
* A backslash is appended to a line to be continued
* A continuation line is prefixed by '+ '
*/
static
void
rmc_logreq
(
const
char
*
const
func
,
char
*
const
logbuf
)
{
int
n1
,
n2
;
char
*
p
;
char
savechrs1
[
2
];
char
savechrs2
[
2
];
n1
=
RMC_LOGBUFSZ
-
strlen
(
func
)
-
36
;
n2
=
strlen
(
logbuf
);
p
=
logbuf
;
while
(
n2
>
n1
)
{
savechrs1
[
0
]
=
*
(
p
+
n1
);
savechrs1
[
1
]
=
*
(
p
+
n1
+
1
);
*
(
p
+
n1
)
=
'\\'
;
*
(
p
+
n1
+
1
)
=
'\0'
;
rmc_logit
(
func
,
RMC98
,
p
);
tl_rmcdaemon
.
tl_log
(
&
tl_rmcdaemon
,
98
,
2
,
"func"
,
TL_MSG_PARAM_STR
,
"rmc_logreq"
,
"Request"
,
TL_MSG_PARAM_STR
,
p
);
if
(
p
!=
logbuf
)
{
*
p
=
savechrs2
[
0
];
*
(
p
+
1
)
=
savechrs2
[
1
];
}
p
+=
n1
-
2
;
savechrs2
[
0
]
=
*
p
;
savechrs2
[
1
]
=
*
(
p
+
1
);
*
p
=
'+'
;
*
(
p
+
1
)
=
' '
;
*
(
p
+
2
)
=
savechrs1
[
0
];
*
(
p
+
3
)
=
savechrs1
[
1
];
n2
-=
n1
;
}
rmc_logit
(
func
,
RMC98
,
p
);
tl_rmcdaemon
.
tl_log
(
&
tl_rmcdaemon
,
98
,
2
,
"func"
,
TL_MSG_PARAM_STR
,
"rmc_logreq"
,
"Request"
,
TL_MSG_PARAM_STR
,
p
);
if
(
p
!=
logbuf
)
{
*
p
=
savechrs2
[
0
];
*
(
p
+
1
)
=
savechrs2
[
1
];
}
}
static
int
marshall_ELEMENT
(
char
**
const
sbpp
,
const
struct
smc_element_info
*
const
element_info
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment