[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/rtmp r9830: Fix extraction of appname from
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] /srv/bzr/gnash/rtmp r9830: Fix extraction of appname from url (should be 'oflaDemo' from rtmp://localhost/oflaDemo/DarkKnight) |
Date: |
Tue, 09 Dec 2008 11:41:06 +0100 |
User-agent: |
Bazaar (1.5) |
------------------------------------------------------------
revno: 9830
committer: Sandro Santilli <address@hidden>
branch nick: rtmp
timestamp: Tue 2008-12-09 11:41:06 +0100
message:
Fix extraction of appname from url (should be 'oflaDemo' from
rtmp://localhost/oflaDemo/DarkKnight)
modified:
utilities/rtmpget.cpp
=== modified file 'utilities/rtmpget.cpp'
--- a/utilities/rtmpget.cpp 2008-11-29 01:43:18 +0000
+++ b/utilities/rtmpget.cpp 2008-12-09 10:41:06 +0000
@@ -277,9 +277,31 @@
}
}
- if (app.empty()) {
+ if (app.empty())
+ {
+
// Get the application name
+ // rtmp://localhost/application/resource
+ // ^^^^^^^^^^^ <-- appname is this
+ //
app = path;
+ if ( ! filename.empty() )
+ {
+ string::size_type end = app.rfind(filename);
+ if (end != string::npos) {
+ app = app.substr(0, end);
+ }
+ }
+
+ // drop slashes
+ string::size_type end = app.find_first_not_of('/');
+ if (end != string::npos) {
+ app = app.substr(end);
+ }
+ end = app.find_last_not_of('/');
+ if (end != string::npos) {
+ app = app.substr(0, end+1);
+ }
if (!query.empty()) {
app = path;
@@ -348,7 +370,7 @@
log_error("Couldn't send NetConnection Connect message,");
//exit(-1);
}
-
+
// make the createStream for ID 3 encoded object
log_debug("Sending NetStream::createStream message,");
BufferSharedPtr buf3 = client.encodeStream(0x2);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/rtmp r9830: Fix extraction of appname from url (should be 'oflaDemo' from rtmp://localhost/oflaDemo/DarkKnight),
Sandro Santilli <=