Update of /cvsroot/mod-c/ehtml/samples
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv21860/samples
Modified Files:
02session.cpp
Log Message:
* Use the propper debugging framework.
Index: 02session.cpp
===================================================================
RCS file: /cvsroot/mod-c/ehtml/samples/02session.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** 02session.cpp 12 Sep 2006 00:21:09 -0000 1.2
--- 02session.cpp 12 Sep 2006 15:28:15 -0000 1.3
***************
*** 86,90 ****
}
lblCount.SetText("count = " + (*session)[COUNT]);
! printf("session id=%s\n", session->ID().hex().c_str());
GetResponse()->SetCookie(Session::SessionIDName(),
session->ID().hex());
--- 86,90 ----
}
lblCount.SetText("count = " + (*session)[COUNT]);
! Debug("Got session id=%s\n", session->ID().hex().c_str());
GetResponse()->SetCookie(Session::SessionIDName(),
session->ID().hex());
***************
*** 97,115 ****
virtual int DoFinishStage() {
if (session && driver) {
! printf("session id=%s\n", session->ID().hex().c_str());
if (!driver->Save(session)) {
! ap_log_error(APLOG_MARK, LOG_ERR, 0,
! Request->GetRequestContext()->r->server,
! "Error saving session (hex=%s): %s",
! session->ID().hex().c_str(),
! strerror(errno));
}
if (!driver->Release(session)) {
! ap_log_error(APLOG_MARK, LOG_ERR, 0,
! Request->GetRequestContext()->r->server,
! "Error releasing session (hex=%s): %s",
! session->ID().hex().c_str(),
! strerror(errno));
}
--- 97,109 ----
virtual int DoFinishStage() {
if (session && driver) {
! Debug("Finish: session id=%s\n", session->ID().hex().c_str());
if (!driver->Save(session)) {
! Error("Error saving session (hex=%s): %s",
! session->ID().hex().c_str(), strerror(errno));
}
if (!driver->Release(session)) {
! Error("Error releasing session (hex=%s): %s",
! session->ID().hex().c_str(), strerror(errno));
}
***************
*** 117,123 ****
//IS TO BE USED.
if (!driver->Disconnect()) {
! ap_log_error(APLOG_MARK, LOG_ERR, 0,
! Request->GetRequestContext()->r->server,
! "Error disconnecting to session server: %s",
strerror(errno));
}
--- 111,115 ----
//IS TO BE USED.
if (!driver->Disconnect()) {
! Error("Error disconnecting to session server: %s",
strerror(errno));
}
***************
*** 140,142 ****
}
-
--- 132,133 ----
|