summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Loftis <ben@glw.com>2008-03-26 20:06:38 +0000
committerBen Loftis <ben@glw.com>2008-03-26 20:06:38 +0000
commita9eb950317fa42f09ce4e45c73a4a96c960574c1 (patch)
tree3ab68faa828fee39ec1d9a1a03c2e3cfc93ba0be
parent5b99530ed4e08c679026b66bf4feb351645b687d (diff)
mo better login detection
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3190 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--gtk2_ardour/sfdb_freesound_mootcher.cc11
1 files changed, 4 insertions, 7 deletions
diff --git a/gtk2_ardour/sfdb_freesound_mootcher.cc b/gtk2_ardour/sfdb_freesound_mootcher.cc
index ba9b4052c8..0b6d2742e7 100644
--- a/gtk2_ardour/sfdb_freesound_mootcher.cc
+++ b/gtk2_ardour/sfdb_freesound_mootcher.cc
@@ -108,7 +108,7 @@ size_t Mootcher::WriteMemoryCallback(void *ptr, size_t size, size_t nmemb, void
//------------------------------------------------------------------------
void Mootcher::toLog(std::string input)
{
-//printf("%s", input.c_str());// for debugging
+printf("%s/n", input.c_str());// for debugging
}
@@ -179,13 +179,10 @@ int Mootcher::doLogin(std::string login, std::string password)
if (connection == 1){
std::string check_page = xml_page.memory;
int test = (int)check_page.find("login"); //logged
- if( test != -1){
- sprintf(message, "Login: %s\n", xml_page.memory);
- toLog(message);
- }
+ if( strcmp(xml_page.memory, "login") == 0 )
+ toLog("Logged in./n");
else {
- sprintf(message, "Login: Check username and password\n");
- toLog(message);
+ toLog("Login failed: Check username and password./n");
connection = 0;
}
}