summaryrefslogtreecommitdiff
path: root/lib/curl_rtmp.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2011-03-14 22:22:22 +0100
committerDaniel Stenberg <daniel@haxx.se>2011-03-14 22:22:22 +0100
commit8831000bc07de463d277975a3ddfb6a31dcf14b4 (patch)
tree0313bc919a3ee27021c352e9efad38ad8c62407e /lib/curl_rtmp.c
parented8749e308a9ed0da49ad46b8b2ba5e8aae80244 (diff)
downloadcurl-8831000bc07de463d277975a3ddfb6a31dcf14b4.tar.gz
protocol handler: added flags field
The protocol handler struct got a 'flags' field for special information and characteristics of the given protocol. This now enables us to move away central protocol information such as CLOSEACTION and DUALCHANNEL from single defines in a central place, out to each protocol's definition. It also made us stop abusing the protocol field for other info than the protocol, and we could start cleaning up other protocol-specific things by adding flags bits to set in the handler struct. The "protocol" field connectdata struct was removed as well and the code now refers directly to the conn->handler->protocol field instead. To make things work properly, the code now always store a conn->given pointer that points out the original handler struct so that the code can learn details from the original protocol even if conn->handler is modified along the way - for example when switching to go over a HTTP proxy.
Diffstat (limited to 'lib/curl_rtmp.c')
-rw-r--r--lib/curl_rtmp.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/lib/curl_rtmp.c b/lib/curl_rtmp.c
index bc1769e67..183db0ded 100644
--- a/lib/curl_rtmp.c
+++ b/lib/curl_rtmp.c
@@ -74,7 +74,8 @@ const struct Curl_handler Curl_handler_rtmp = {
ZERO_NULL, /* perform_getsock */
rtmp_disconnect, /* disconnect */
PORT_RTMP, /* defport */
- PROT_RTMP /* protocol */
+ PROT_RTMP, /* protocol */
+ PROTOPT_NONE /* flags*/
};
const struct Curl_handler Curl_handler_rtmpt = {
@@ -91,7 +92,8 @@ const struct Curl_handler Curl_handler_rtmpt = {
ZERO_NULL, /* perform_getsock */
rtmp_disconnect, /* disconnect */
PORT_RTMPT, /* defport */
- PROT_RTMPT /* protocol */
+ PROT_RTMPT, /* protocol */
+ PROTOPT_NONE /* flags*/
};
const struct Curl_handler Curl_handler_rtmpe = {
@@ -108,7 +110,8 @@ const struct Curl_handler Curl_handler_rtmpe = {
ZERO_NULL, /* perform_getsock */
rtmp_disconnect, /* disconnect */
PORT_RTMP, /* defport */
- PROT_RTMPE /* protocol */
+ PROT_RTMPE, /* protocol */
+ PROTOPT_NONE /* flags*/
};
const struct Curl_handler Curl_handler_rtmpte = {
@@ -125,7 +128,8 @@ const struct Curl_handler Curl_handler_rtmpte = {
ZERO_NULL, /* perform_getsock */
rtmp_disconnect, /* disconnect */
PORT_RTMPT, /* defport */
- PROT_RTMPTE /* protocol */
+ PROT_RTMPTE, /* protocol */
+ PROTOPT_NONE /* flags*/
};
const struct Curl_handler Curl_handler_rtmps = {
@@ -142,7 +146,8 @@ const struct Curl_handler Curl_handler_rtmps = {
ZERO_NULL, /* perform_getsock */
rtmp_disconnect, /* disconnect */
PORT_RTMPS, /* defport */
- PROT_RTMPS /* protocol */
+ PROT_RTMPS, /* protocol */
+ PROTOPT_NONE /* flags*/
};
const struct Curl_handler Curl_handler_rtmpts = {
"RTMPTS", /* scheme */
@@ -158,7 +163,8 @@ const struct Curl_handler Curl_handler_rtmpts = {
ZERO_NULL, /* perform_getsock */
rtmp_disconnect, /* disconnect */
PORT_RTMPS, /* defport */
- PROT_RTMPTS /* protocol */
+ PROT_RTMPTS, /* protocol */
+ PROTOPT_NONE /* flags*/
};
static CURLcode rtmp_setup(struct connectdata *conn)