[Live-devel] Failed authentication notification?

Ross Finlayson finlayson at live555.com
Thu Mar 12 15:39:03 PDT 2009


>Is there any consistent way for a client to know that authentication has
>failed?  It needs to know this so it can prompt the user for their
>login/password.  I've been looking at the RTSPClient.cpp code, but I can't
>see any consistent way that it reports an authentication failure.

This is something that the current code doesn't handle very well, 
unfortunately.  For now, you can do what VLC's LIVE555 interface code 
(see "modules_demux_live555.cpp" in the VLC code) does: Look at the 
result of "describeURL()" call.  If it's NULL, then get the error 
message (using "getResultMsg()"), and parse it to get the RTSP 
response code.  Then, if that response code is 401, then prompt/get 
your username,password, and retry the "DESCRIBE", using either 
"describeURL()" with a filled-in authenticator, or using 
"describeWithPassword()".

Ugh - this is gross.  It's yet another thing I'm going to have to fix 
when I rewrite the "RTSPClient" class.
-- 

Ross Finlayson
Live Networks, Inc.
http://www.live555.com/


More information about the live-devel mailing list