projects
/
fms.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5f8a87e
)
version 0.1.5
author
SomeDude
<SomeDude@NuBL7aaJ6Cn4fB7GXFb9Zfi8w1FhPyW3oKgU9TweZMw>
Fri, 1 Feb 2008 08:40:00 +0000
(09:40 +0100)
committer
David ‘Bombe’ Roden
<bombe@freenetproject.org>
Fri, 1 Feb 2008 08:40:00 +0000
(09:40 +0100)
include/db/sqlite3db/sqlite3statement.h
patch
|
blob
|
history
include/global.h
patch
|
blob
|
history
include/pthreadwrapper/deadlockexception.h
patch
|
blob
|
history
src/db/sqlite3statement.cpp
patch
|
blob
|
history
src/global.cpp
patch
|
blob
|
history
diff --git
a/include/db/sqlite3db/sqlite3statement.h
b/include/db/sqlite3db/sqlite3statement.h
index
04b24a0
..
bdca9dc
100644
(file)
--- a/
include/db/sqlite3db/sqlite3statement.h
+++ b/
include/db/sqlite3db/sqlite3statement.h
@@
-58,7
+58,7
@@
private:
\r
static std::map<sqlite3_stmt *, long> m_statementcount;
\r
//std::vector<char *> textptrs;
\r
\r
static std::map<sqlite3_stmt *, long> m_statementcount;
\r
//std::vector<char *> textptrs;
\r
-
std::vector<std::vector<char>
> m_boundtext;
\r
+
//std::vector<std::vector<char>
> m_boundtext;
\r
\r
}; //class
\r
\r
\r
}; //class
\r
\r
diff --git
a/include/global.h
b/include/global.h
index
b2df48f
..
6f5445f
100644
(file)
--- a/
include/global.h
+++ b/
include/global.h
@@
-5,7
+5,7
@@
//#include <zthread/Thread.h>
\r
#include "pthreadwrapper/thread.h"
\r
\r
//#include <zthread/Thread.h>
\r
#include "pthreadwrapper/thread.h"
\r
\r
-#define FMS_VERSION "0.1.
4
"
\r
+#define FMS_VERSION "0.1.
5
"
\r
\r
// opens database and creates tables and initial inserts if necessary
\r
void SetupDB();
\r
\r
// opens database and creates tables and initial inserts if necessary
\r
void SetupDB();
\r
diff --git
a/include/pthreadwrapper/deadlockexception.h
b/include/pthreadwrapper/deadlockexception.h
index
3f83736
..
9aa12ff
100644
(file)
--- a/
include/pthreadwrapper/deadlockexception.h
+++ b/
include/pthreadwrapper/deadlockexception.h
@@
-9,7
+9,7
@@
namespace PThread
class DeadlockException:public std::exception
\r
{
\r
public:
\r
class DeadlockException:public std::exception
\r
{
\r
public:
\r
- const char *what() const { return "Deadlock Exception"; }
\r
+ const char *what() const
throw()
{ return "Deadlock Exception"; }
\r
};
\r
\r
} // namespace
\r
};
\r
\r
} // namespace
\r
diff --git
a/src/db/sqlite3statement.cpp
b/src/db/sqlite3statement.cpp
index
538ed06
..
60762f0
100644
(file)
--- a/
src/db/sqlite3statement.cpp
+++ b/
src/db/sqlite3statement.cpp
@@
-54,6
+54,7
@@
Statement::~Statement()
}
\r
}
\r
*/
\r
}
\r
}
\r
*/
\r
+
\r
}
\r
\r
const bool Statement::Bind(const int column)
\r
}
\r
\r
const bool Statement::Bind(const int column)
\r
@@
-130,9
+131,10
@@
const bool Statement::Bind(const int column, const std::string &value)
\r
//ZThread::Guard<ZThread::Mutex> g(DB::instance()->m_mutex);
\r
PThread::Guard g(DB::Instance()->m_mutex);
\r
\r
//ZThread::Guard<ZThread::Mutex> g(DB::instance()->m_mutex);
\r
PThread::Guard g(DB::Instance()->m_mutex);
\r
- m_boundtext.push_back(std::vector<char>(value.begin(),value.end()));
\r
+
//
m_boundtext.push_back(std::vector<char>(value.begin(),value.end()));
\r
//if(sqlite3_bind_text(m_statement,column+1,text,value.size(),NULL)==SQLITE_OK)
\r
//if(sqlite3_bind_text(m_statement,column+1,text,value.size(),NULL)==SQLITE_OK)
\r
- if(sqlite3_bind_text(m_statement,column+1,&m_boundtext[m_boundtext.size()-1][0],m_boundtext[m_boundtext.size()-1].size(),NULL)==SQLITE_OK)
\r
+ //if(sqlite3_bind_text(m_statement,column+1,&(m_boundtext[m_boundtext.size()-1][0]),(m_boundtext[m_boundtext.size()-1]).size(),NULL)==SQLITE_OK)
\r
+ if(sqlite3_bind_text(m_statement,column+1,value.c_str(),value.size(),SQLITE_TRANSIENT)==SQLITE_OK)
\r
{
\r
return true;
\r
}
\r
{
\r
return true;
\r
}
\r
@@
-153,7
+155,7
@@
const bool Statement::Bind(const int column, const void *data, const int length)
{
\r
//ZThread::Guard<ZThread::Mutex> g(DB::instance()->m_mutex);
\r
PThread::Guard g(DB::Instance()->m_mutex);
\r
{
\r
//ZThread::Guard<ZThread::Mutex> g(DB::instance()->m_mutex);
\r
PThread::Guard g(DB::Instance()->m_mutex);
\r
- if(sqlite3_bind_blob(m_statement,column+1,data,length,
NULL
)==SQLITE_OK)
\r
+ if(sqlite3_bind_blob(m_statement,column+1,data,length,
SQLITE_TRANSIENT
)==SQLITE_OK)
\r
{
\r
return true;
\r
}
\r
{
\r
return true;
\r
}
\r
diff --git
a/src/global.cpp
b/src/global.cpp
index
d4cc101
..
291f06b
100644
(file)
--- a/
src/global.cpp
+++ b/
src/global.cpp
@@
-426,13
+426,13
@@
void SetupDefaultOptions()
st.Reset();
\r
\r
st.Bind(0,"MessageDownloadMaxDaysBackward");
\r
st.Reset();
\r
\r
st.Bind(0,"MessageDownloadMaxDaysBackward");
\r
- st.Bind(1,"
3
");
\r
+ st.Bind(1,"
5
");
\r
st.Bind(2,"The maximum number of days backward that messages will be downloaded from each identity");
\r
st.Step();
\r
st.Reset();
\r
\r
st.Bind(0,"MessageListDaysBackward");
\r
st.Bind(2,"The maximum number of days backward that messages will be downloaded from each identity");
\r
st.Step();
\r
st.Reset();
\r
\r
st.Bind(0,"MessageListDaysBackward");
\r
- st.Bind(1,"
3
");
\r
+ st.Bind(1,"
5
");
\r
st.Bind(2,"The number of days backward that messages you have inserted will appear in your MessageLists");
\r
st.Step();
\r
st.Reset();
\r
st.Bind(2,"The number of days backward that messages you have inserted will appear in your MessageLists");
\r
st.Step();
\r
st.Reset();
\r