summaryrefslogtreecommitdiff
path: root/lib/rtsp.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2013-08-05 10:32:08 +0200
committerDaniel Stenberg <daniel@haxx.se>2013-08-12 13:17:57 +0200
commite79535bc5e8e25df8415b6b23671cbd8bd3c83a5 (patch)
treedf811d60b9433abd50856a9f62ee7bb8a3d9cfeb /lib/rtsp.c
parent4ad8e142da463ab208d5b5565e53291c8e5ef038 (diff)
downloadcurl-e79535bc5e8e25df8415b6b23671cbd8bd3c83a5.tar.gz
SessionHandle: the protocol specific pointer is now a void *
All protocol handler structs are now opaque (void *) in the SessionHandle struct and moved in the request-specific sub-struct 'SingleRequest'. The intension is to keep the protocol specific knowledge in their own dedicated source files [protocol].c etc. There's some "leakage" where this policy is violated, to be addressed at a later point in time.
Diffstat (limited to 'lib/rtsp.c')
-rw-r--r--lib/rtsp.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/rtsp.c b/lib/rtsp.c
index eac12904d..f7c6562a7 100644
--- a/lib/rtsp.c
+++ b/lib/rtsp.c
@@ -129,7 +129,7 @@ static CURLcode rtsp_setup_connection(struct connectdata *conn)
{
struct RTSP *rtsp;
- conn->data->state.proto.rtsp = rtsp = calloc(1, sizeof(struct RTSP));
+ conn->data->req.protop = rtsp = calloc(1, sizeof(struct RTSP));
if(!rtsp)
return CURLE_OUT_OF_MEMORY;
@@ -200,7 +200,7 @@ static CURLcode rtsp_done(struct connectdata *conn,
CURLcode status, bool premature)
{
struct SessionHandle *data = conn->data;
- struct RTSP *rtsp = data->state.proto.rtsp;
+ struct RTSP *rtsp = data->req.protop;
CURLcode httpStatus;
long CSeq_sent;
long CSeq_recv;
@@ -236,7 +236,7 @@ static CURLcode rtsp_do(struct connectdata *conn, bool *done)
struct SessionHandle *data = conn->data;
CURLcode result=CURLE_OK;
Curl_RtspReq rtspreq = data->set.rtspreq;
- struct RTSP *rtsp = data->state.proto.rtsp;
+ struct RTSP *rtsp = data->req.protop;
struct HTTP *http;
Curl_send_buffer *req_buffer;
curl_off_t postsize = 0; /* for ANNOUNCE and SET_PARAMETER */
@@ -750,7 +750,8 @@ CURLcode Curl_rtsp_parseheader(struct connectdata *conn,
/* Store the received CSeq. Match is verified in rtsp_done */
int nc = sscanf(&header[4], ": %ld", &CSeq);
if(nc == 1) {
- data->state.proto.rtsp->CSeq_recv = CSeq; /* mark the request */
+ struct RTSP *rtsp = data->req.protop;
+ rtsp->CSeq_recv = CSeq; /* mark the request */
data->state.rtsp_CSeq_recv = CSeq; /* update the handle */
}
else {