summaryrefslogtreecommitdiff
path: root/lib/curl_rtmp.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2019-09-03 13:31:44 +0200
committerDaniel Stenberg <daniel@haxx.se>2019-09-03 23:00:51 +0200
commit4ac288400355743c2f2a7a302daee57751d1238f (patch)
treec05f68764b1ec5e1b46840ed9152d1375c731ea6 /lib/curl_rtmp.c
parent5050edb12484551f4c666212409c117cf38f9784 (diff)
downloadcurl-4ac288400355743c2f2a7a302daee57751d1238f.tar.gz
urldata: avoid 'generic', use dedicated pointers
For the 'proto' union within the connectdata struct. Closes #4290
Diffstat (limited to 'lib/curl_rtmp.c')
-rw-r--r--lib/curl_rtmp.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/curl_rtmp.c b/lib/curl_rtmp.c
index 16b1de1ae..df8f2b1d9 100644
--- a/lib/curl_rtmp.c
+++ b/lib/curl_rtmp.c
@@ -199,13 +199,13 @@ static CURLcode rtmp_setup_connection(struct connectdata *conn)
RTMP_Free(r);
return CURLE_URL_MALFORMAT;
}
- conn->proto.generic = r;
+ conn->proto.rtmp = r;
return CURLE_OK;
}
static CURLcode rtmp_connect(struct connectdata *conn, bool *done)
{
- RTMP *r = conn->proto.generic;
+ RTMP *r = conn->proto.rtmp;
SET_RCVTIMEO(tv, 10);
r->m_sb.sb_socket = (int)conn->sock[FIRSTSOCKET];
@@ -240,7 +240,7 @@ static CURLcode rtmp_connect(struct connectdata *conn, bool *done)
static CURLcode rtmp_do(struct connectdata *conn, bool *done)
{
struct Curl_easy *data = conn->data;
- RTMP *r = conn->proto.generic;
+ RTMP *r = conn->proto.rtmp;
if(!RTMP_ConnectStream(r, 0))
return CURLE_FAILED_INIT;
@@ -268,10 +268,10 @@ static CURLcode rtmp_done(struct connectdata *conn, CURLcode status,
static CURLcode rtmp_disconnect(struct connectdata *conn,
bool dead_connection)
{
- RTMP *r = conn->proto.generic;
+ RTMP *r = conn->proto.rtmp;
(void)dead_connection;
if(r) {
- conn->proto.generic = NULL;
+ conn->proto.rtmp = NULL;
RTMP_Close(r);
RTMP_Free(r);
}
@@ -281,7 +281,7 @@ static CURLcode rtmp_disconnect(struct connectdata *conn,
static ssize_t rtmp_recv(struct connectdata *conn, int sockindex, char *buf,
size_t len, CURLcode *err)
{
- RTMP *r = conn->proto.generic;
+ RTMP *r = conn->proto.rtmp;
ssize_t nread;
(void)sockindex; /* unused */
@@ -302,7 +302,7 @@ static ssize_t rtmp_recv(struct connectdata *conn, int sockindex, char *buf,
static ssize_t rtmp_send(struct connectdata *conn, int sockindex,
const void *buf, size_t len, CURLcode *err)
{
- RTMP *r = conn->proto.generic;
+ RTMP *r = conn->proto.rtmp;
ssize_t num;
(void)sockindex; /* unused */