Merge pull request #138 from alexolivan/dnas_passwords
Fixed SHOUTCast password #138
This commit is contained in:
commit
d3825f3e17
|
@ -133,11 +133,15 @@ ConfigSection :: addLine ( const char * line ) throw ( Exception )
|
|||
|
||||
std::string::size_type ix;
|
||||
std::string str( line);
|
||||
std::string str2 ("password");
|
||||
|
||||
if ( (ix = str.find(str2)) == str.npos ) {
|
||||
/* delete everything after the first # */
|
||||
if ( (ix = str.find( '#')) != str.npos ) {
|
||||
str.erase( ix);
|
||||
}
|
||||
}
|
||||
|
||||
/* eat up all white space from the front */
|
||||
if ( (ix = str.find_first_not_of( WHITE_SPACE_STR)) != str.npos ) {
|
||||
str.erase( 0, ix);
|
||||
|
@ -170,4 +174,3 @@ ConfigSection :: addLine ( const char * line ) throw ( Exception )
|
|||
/* now add the new key / value pair */
|
||||
return add( key.c_str(), value.c_str());
|
||||
}
|
||||
|
||||
|
|
|
@ -792,7 +792,7 @@ DarkIce :: configShoutCast ( const Config & config,
|
|||
FileSink * localDumpFile = 0;
|
||||
bool fileAddDate = false;
|
||||
const char * fileDateFormat = 0;
|
||||
BufferedSink * audioOut = 0;
|
||||
AudioEncoder * encoder = 0;
|
||||
int bufferSize = 0;
|
||||
|
||||
str = cs->get( "sampleRate");
|
||||
|
@ -907,9 +907,7 @@ DarkIce :: configShoutCast ( const Config & config,
|
|||
localDumpFile);
|
||||
|
||||
|
||||
audioOut = new BufferedSink(audioOuts[u].socket.get(), bufferSize, 1);
|
||||
audioOuts[u].encoder = new LameLibEncoder(
|
||||
audioOut,
|
||||
encoder = new LameLibEncoder( audioOuts[u].server.get(),
|
||||
dsp.get(),
|
||||
bitrateMode,
|
||||
bitrate,
|
||||
|
@ -918,6 +916,7 @@ DarkIce :: configShoutCast ( const Config & config,
|
|||
channel,
|
||||
lowpass,
|
||||
highpass );
|
||||
audioOuts[u].encoder = new BufferedSink(encoder, bufferSize, dsp->getSampleSize());
|
||||
|
||||
encConnector->attach( audioOuts[u].encoder.get());
|
||||
#endif // HAVE_LAME_LIB
|
||||
|
|
|
@ -99,11 +99,15 @@ Config :: addLine ( const char * line ) throw ( Exception )
|
|||
|
||||
std::string::size_type ix;
|
||||
std::string str( line);
|
||||
std::string str2 ("password");
|
||||
|
||||
if ( (ix = str.find(str2)) == str.npos ) {
|
||||
/* delete everything after the first # */
|
||||
if ( (ix = str.find( '#')) != str.npos ) {
|
||||
str.erase( ix);
|
||||
}
|
||||
}
|
||||
|
||||
/* eat up all white space from the front */
|
||||
if ( (ix = str.find_first_not_of( WHITE_SPACE_STR)) != str.npos ) {
|
||||
str.erase( 0, ix);
|
||||
|
@ -162,5 +166,3 @@ Config :: read ( std::istream & is ) throw ( Exception )
|
|||
addLine( line);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue