cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: [PATCH] librtmp support

From: Howard Chu <hyc_at_highlandsun.com>
Date: Tue, 11 May 2010 17:14:06 -0700

Howard Chu wrote:
> Howard Chu wrote:
>> Daniel Stenberg wrote:
>>> On Thu, 6 May 2010, Howard Chu wrote:
>>>
>>>> librtmp doesn't like non-blocking sockets; we normally just use a receive
>>>> timeout. So that's what I've done here; it would be rather painful to change
>>>> this behavior...
>>>
>>> The downside may not be that obvious or big, but it may hamper how good RTMP
>>> works together with other protocols when the multi interface is used. But I'm
>>> totally willing to go with whatever works now as it can always be improved in
>>> the future.
>>
>> Sounds good. I'll think about how to make that work in librtmp down the road.
>
> This patch replaces the previous one, and adds the configure/build hooks.
>
> There's still a caveat for building - currently librtmp only provides a static
> library. You'll have to build librtmp with "make XCFLAGS=-fPIC" to allow it to
> be linked into libcurl.so.

That patch needs this small change now that the send/recv handlers have been
fixed for FTPS support.

diff --git a/lib/curl_rtmp.c b/lib/curl_rtmp.c
index d9fe37b..4700719 100644
--- a/lib/curl_rtmp.c
+++ b/lib/curl_rtmp.c
@@ -196,8 +196,8 @@ static CURLcode rtmp_connect(struct connectdata *conn, bool
    r->m_bSendCounter = true;

    *done = TRUE;
- conn->recv = rtmp_recv;
- conn->send = rtmp_send;
+ conn->recv[FIRSTSOCKET] = rtmp_recv;
+ conn->send[FIRSTSOCKET] = rtmp_send;
    return CURLE_OK;
  }

It looks like I also need to patch lib/version.c to list the added rtmp
protocols. Want that as a separate diff, or should I just resend a single
large diff with everything?

-- 
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2010-05-12