summaryrefslogtreecommitdiff
path: root/src/dalstorage.cpp
diff options
context:
space:
mode:
authorYohann Ferreira <bertram@cegetel.net>2006-01-04 21:06:07 +0000
committerYohann Ferreira <bertram@cegetel.net>2006-01-04 21:06:07 +0000
commit0417f123f1975202900ed0b3ec1bb8362f9f1567 (patch)
tree5d51c3478b0921184a950ae5847627b3f96b05ab /src/dalstorage.cpp
parent65c5f32f9622583bd158d3baa52056cb3b7be4f6 (diff)
downloadmanaserv-0417f123f1975202900ed0b3ec1bb8362f9f1567.tar.gz
manaserv-0417f123f1975202900ed0b3ec1bb8362f9f1567.tar.bz2
manaserv-0417f123f1975202900ed0b3ec1bb8362f9f1567.tar.xz
manaserv-0417f123f1975202900ed0b3ec1bb8362f9f1567.zip
Implemented server response handling to the test client. Fixed a bug that made the Email change not possible. Changed some protocol value to have a litte neater client code. Added FreeBSD fix idea from icy to server code.
Diffstat (limited to 'src/dalstorage.cpp')
-rw-r--r--src/dalstorage.cpp18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/dalstorage.cpp b/src/dalstorage.cpp
index c0359754..4b6ce81f 100644
--- a/src/dalstorage.cpp
+++ b/src/dalstorage.cpp
@@ -406,10 +406,11 @@ DALStorage::getEmailList()
}
/**
- * Tells if Email already exists.
+ * Return the number of same Emails in account's table.
*/
-bool
-DALStorage::doesEmailAlreadyExists(const std::string &email)
+
+unsigned int
+DALStorage::getSameEmailNumber(const std::string &email)
{
// If not opened already
open();
@@ -427,16 +428,9 @@ DALStorage::doesEmailAlreadyExists(const std::string &email)
}
std::stringstream ssStream(accountInfo(0,0));
- int iReturn = -1;
+ unsigned int iReturn = 0;
ssStream >> iReturn;
- if ( iReturn > 0 )
- {
- return true;
- }
- else
- {
- return false;
- }
+ return iReturn;
}
catch (const dal::DbSqlQueryExecFailure& e) {
// TODO: throw an exception.