minor bug in httpinput.cpp

2000-10-24 Thread Scott McCaskill

Right around line 507 is the following code:

file = string(strchr(m_path + 7, '/'));

Problem is, this blows up if m_path is something like
"http://205.188.245.131:8038", since strchr is returning null and the string
constructor doesn't like that (on windows anyway).  I worked around it like
this:

const char* address = strchr(m_path + 7, '/');
file = (address ? address : "");

I'm at a loss as to why I didn't see this problem last week, when I was
doing the exact same thing (playing a stream).  Oh well..

Incidentally, I've been looking at the code because I want to see if it's
feasible to augment the stream-saving functionality so that songs will be
saved in separate files and directories according to artist and song title.
I don't even know yet if this is doable (if the server provides enough info)
but I figured I would take a look.

cheers,

Scott McCaskill


___
[EMAIL PROTECTED]
http://www.freeamp.org/mailman/listinfo/freeamp-dev



Exception in Musicbrowser.ui

2000-10-24 Thread ROBERTS, MARK

All,

I'm getting an "Unhandled exception in Freeamp.exe (MUSICBROWSER.UI):
0xC094: Integer divide by Zero" when I click on "Recommend Playlist" or
"Sounds Like Recommendation" under the Relatable menu item in the music
browser.

Everything else seems to be working and I had no compile problems.

Any thoughts?

Mark
___
[EMAIL PROTECTED]
http://www.freeamp.org/mailman/listinfo/freeamp-dev



Re: minor bug in httpinput.cpp

2000-10-24 Thread rob

On 24 Oct, Scott McCaskill wrote:
 Right around line 507 is the following code:
 
 file = string(strchr(m_path + 7, '/'));
 
 Problem is, this blows up if m_path is something like
 "http://205.188.245.131:8038", since strchr is returning null and the string
 constructor doesn't like that (on windows anyway).  I worked around it like
 this:
 
 const char* address = strchr(m_path + 7, '/');
 file = (address ? address : "");

Thanks for catching this. I haven't run these changes on windows yet.

 I'm at a loss as to why I didn't see this problem last week, when I was
 doing the exact same thing (playing a stream).  Oh well..

It looks like you're updating from CVS. Late last week I was tweaking
with the proxy support and changed those lines of code.

 Incidentally, I've been looking at the code because I want to see if it's
 feasible to augment the stream-saving functionality so that songs will be
 saved in separate files and directories according to artist and song title.
 I don't even know yet if this is doable (if the server provides enough info)
 but I figured I would take a look.

We've already received a patch to do this, but the user interface
elements are still missing from this patch. We're getting really close
to 2.1 and I'm not likely to include this in the 2.1 series. However,
I've created a branch and checked this patch in, so anyone that cares to
play with this patch can do so. In order to get the CVS code with the
splitting stuff, do this:

cvs -z9 update -rhttp_split_branch

or

cvs -z9 co -rhttp_split_branch freeamp

Thanks to Arne Janson for writing the first version of this stuff.


--ruaok Freezerburn! All else is only icing. -- Soul Coughing

Robert Kaye -- [EMAIL PROTECTED]  http://moon.eorbit.net/~robert

___
[EMAIL PROTECTED]
http://www.freeamp.org/mailman/listinfo/freeamp-dev