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
1f8a1940
Commit
1f8a1940
authored
11 years ago
by
Steven Murray
Browse files
Options
Downloads
Patches
Plain Diff
Removed the unused C function named rtcpc_kill()
parent
06a37aaa
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
h/rtcp_api.h
+0
-3
0 additions, 3 deletions
h/rtcp_api.h
rtcopy/rtcpapi.c
+0
-83
0 additions, 83 deletions
rtcopy/rtcpapi.c
with
0 additions
and
86 deletions
h/rtcp_api.h
+
0
−
3
View file @
1f8a1940
...
...
@@ -91,9 +91,6 @@ EXTERN_C int rtcp_NewFileList (
EXTERN_C
int
rtcpc_CheckRetry
(
tape_list_t
*
);
EXTERN_C
int
rtcpc_kill
(
void
);
EXTERN_C
int
rtcpc_validCksumAlg
(
char
*
);
...
...
This diff is collapsed.
Click to expand it.
rtcopy/rtcpapi.c
+
0
−
83
View file @
1f8a1940
...
...
@@ -46,86 +46,3 @@ extern int rtcp_SendReq (int *, rtcpHdr_t *, rtcpClientInfo_t *,
rtcpTapeRequest_t
*
,
rtcpFileRequest_t
*
);
extern
int
rtcp_RecvAckn
(
int
*
,
int
);
extern
int
rtcp_CloseConnection
(
int
*
);
/*
* Kill mechanism is not thread-safe if several threads run rtcpc() in
* parallel. It is used by rtcopy server when running old SHIFT clients.
*/
static
rtcpc_sockets_t
*
last_socks
=
NULL
;
static
tape_list_t
*
last_tape
=
NULL
;
static
int
rtcpc_killed
=
0
;
static
int
rtcpc_ResetKillInfo
()
{
last_socks
=
NULL
;
last_tape
=
NULL
;
return
(
0
);
}
int
rtcpc_finished
(
rtcpc_sockets_t
**
socks
,
rtcpHdr_t
*
hdr
,
tape_list_t
*
tape
)
{
int
i
,
rc
,
retval
,
save_serrno
;
if
(
rtcpc_killed
==
0
)
(
void
)
rtcpc_ResetKillInfo
();
rc
=
retval
=
save_serrno
=
0
;
if
(
socks
!=
NULL
&&
*
socks
!=
NULL
)
{
if
(
(
*
socks
)
->
abort_socket
!=
-
1
&&
hdr
!=
NULL
)
{
hdr
->
magic
=
RTCOPY_MAGIC
;
hdr
->
len
=
-
1
;
rc
=
rtcp_SendReq
(
&
((
*
socks
)
->
abort_socket
),
hdr
,
NULL
,
NULL
,
NULL
);
if
(
hdr
->
reqtype
==
RTCP_ENDOF_REQ
)
{
if
(
rc
==
-
1
)
{
save_serrno
=
serrno
;
rtcp_log
(
LOG_ERR
,
"rtcpc_finished() rtcp_SendReq(ENDOF_REQ): %s
\n
"
,
sstrerror
(
serrno
));
}
else
{
rtcp_log
(
LOG_DEBUG
,
"rtcpc_finished(): Receive acknowledge
\n
"
);
rc
=
rtcp_RecvAckn
(
&
((
*
socks
)
->
abort_socket
),
hdr
->
reqtype
);
if
(
rc
==
-
1
)
{
save_serrno
=
serrno
;
rtcp_log
(
LOG_ERR
,
"rtcpc_finished() rtcp_RecvAckn(TAPE_REQ): %s
\n
"
,
sstrerror
(
serrno
));
}
}
}
(
void
)
rtcp_CloseConnection
(
&
((
*
socks
)
->
abort_socket
));
if
(
rc
==
-
1
)
retval
=
-
1
;
}
for
(
i
=
0
;
i
<
100
;
i
++
)
{
if
(
(
*
socks
)
->
proc_socket
[
i
]
!=
NULL
&&
*
((
*
socks
)
->
proc_socket
[
i
])
!=
-
1
)
{
(
void
)
rtcp_CloseConnection
((
*
socks
)
->
proc_socket
[
i
]);
free
((
*
socks
)
->
proc_socket
[
i
]);
(
*
socks
)
->
proc_socket
[
i
]
=
NULL
;
}
}
(
void
)
rtcp_CleanUp
(
&
((
*
socks
)
->
listen_socket
),
0
);
free
(
*
socks
);
*
socks
=
NULL
;
}
/*
* We only cancel VDQM job if it hasn't been assigned. Otherwise
* it is automatically cancelled when the tape server releases the drive.
*/
if
(
tape
!=
NULL
&&
tape
->
tapereq
.
VolReqID
>
0
&&
tape
->
tapereq
.
TStartRtcpd
<=
0
)
{
rtcp_log
(
LOG_DEBUG
,
"rtcpc_finished() cancelling VolReqID %d, VID: %s dgn: %s
\n
"
,
tape
->
tapereq
.
VolReqID
,
tape
->
tapereq
.
vid
,
tape
->
tapereq
.
dgn
);
rc
=
vdqm_DelVolumeReq
(
NULL
,
tape
->
tapereq
.
VolReqID
,
tape
->
tapereq
.
vid
,
tape
->
tapereq
.
dgn
,
NULL
,
NULL
,
0
);
rtcp_log
(
LOG_DEBUG
,
"rtcpc_finished() vdqm_DelVolumeReq() returned rc=%d %s
\n
"
,
rc
,(
rc
!=
0
?
sstrerror
(
serrno
)
:
""
));
serrno
=
save_serrno
;
}
(
void
)
rtcpc_ResetKillInfo
();
rc
=
retval
;
if
(
save_serrno
!=
0
)
serrno
=
save_serrno
;
return
(
rc
);
}
int
rtcpc_kill
()
{
rtcpHdr_t
hdr
;
hdr
.
reqtype
=
RTCP_ABORT_REQ
;
rtcpc_killed
=
1
;
return
(
rtcpc_finished
(
&
last_socks
,
&
hdr
,
last_tape
));
}
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