projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
62c7a61
)
Use a single function to transition from IO to DB Queue
author
Wilfried Goesgens
<dothebart@citadel.org>
Thu, 23 Oct 2014 19:03:09 +0000
(21:03 +0200)
committer
Wilfried Goesgens
<dothebart@citadel.org>
Thu, 23 Oct 2014 19:03:09 +0000
(21:03 +0200)
citadel/event_client.c
patch
|
blob
|
history
citadel/event_client.h
patch
|
blob
|
history
citadel/modules/networkclient/serv_networkclient.c
patch
|
blob
|
history
citadel/modules/smtp/serv_smtpeventclient.c
patch
|
blob
|
history
diff --git
a/citadel/event_client.c
b/citadel/event_client.c
index d64e95bacc6da8b6ad648a931d3a9931c1fad697..b3b52e68894dd9f3319d9a67e15e1ebfa0aa4f2e 100644
(file)
--- a/
citadel/event_client.c
+++ b/
citadel/event_client.c
@@
-257,9
+257,9
@@
eNextState QueueEventContext(AsyncIO *IO, IO_CallBack CB)
return eSendReply;
}
return eSendReply;
}
-eNextState EventQueueDBOperation(AsyncIO *IO, IO_CallBack CB)
+eNextState EventQueueDBOperation(AsyncIO *IO, IO_CallBack CB
, int CloseFDs
)
{
{
- StopClientWatchers(IO,
0
);
+ StopClientWatchers(IO,
CloseFDs
);
return QueueDBOperation(IO, CB);
}
eNextState DBQueueEventContext(AsyncIO *IO, IO_CallBack CB)
return QueueDBOperation(IO, CB);
}
eNextState DBQueueEventContext(AsyncIO *IO, IO_CallBack CB)
diff --git
a/citadel/event_client.h
b/citadel/event_client.h
index a5e0c326f5e0b08a401b4020a5605eeda04bbc22..8777a34333d9509c2a30f7a134d1c30fb3530ff2 100644
(file)
--- a/
citadel/event_client.h
+++ b/
citadel/event_client.h
@@
-283,7
+283,7
@@
void FreeAsyncIOContents(AsyncIO *IO);
eNextState NextDBOperation(AsyncIO *IO, IO_CallBack CB);
eNextState QueueDBOperation(AsyncIO *IO, IO_CallBack CB);
eNextState NextDBOperation(AsyncIO *IO, IO_CallBack CB);
eNextState QueueDBOperation(AsyncIO *IO, IO_CallBack CB);
-eNextState EventQueueDBOperation(AsyncIO *IO, IO_CallBack CB);
+eNextState EventQueueDBOperation(AsyncIO *IO, IO_CallBack CB
, int CloseFDs
);
void StopDBWatchers(AsyncIO *IO);
eNextState QueueEventContext(AsyncIO *IO, IO_CallBack CB);
eNextState QueueCurlContext(AsyncIO *IO);
void StopDBWatchers(AsyncIO *IO);
eNextState QueueEventContext(AsyncIO *IO, IO_CallBack CB);
eNextState QueueCurlContext(AsyncIO *IO);
diff --git
a/citadel/modules/networkclient/serv_networkclient.c
b/citadel/modules/networkclient/serv_networkclient.c
index 95badfb6854383974c3d9478ce20b5d2602105e7..72f48367ca7869a21f2a7239802e689fb4667a7a 100644
(file)
--- a/
citadel/modules/networkclient/serv_networkclient.c
+++ b/
citadel/modules/networkclient/serv_networkclient.c
@@
-242,8
+242,8
@@
eNextState NWC_ReadGreeting(AsyncNetworker *NW)
"Connected to node \"%s\" but I was expecting to connect to node \"%s\".",
connected_to, ChrPtr(NW->node));
EVN_syslog(LOG_ERR, "%s\n", ChrPtr(NW->IO.ErrMsg));
"Connected to node \"%s\" but I was expecting to connect to node \"%s\".",
connected_to, ChrPtr(NW->node));
EVN_syslog(LOG_ERR, "%s\n", ChrPtr(NW->IO.ErrMsg));
- StopClientWatchers(IO, 1);
- return
QueueDBOperation(IO, NWC_SendFailureMessage
);
+
+ return
EventQueueDBOperation(IO, NWC_SendFailureMessage, 1
);
}
return eSendReply;
}
}
return eSendReply;
}
diff --git
a/citadel/modules/smtp/serv_smtpeventclient.c
b/citadel/modules/smtp/serv_smtpeventclient.c
index 3874bf8f47d57de55e818d95a431ab58df4572cb..a9317105dc123053b0d101fbe577e8a0755e7b8e 100644
(file)
--- a/
citadel/modules/smtp/serv_smtpeventclient.c
+++ b/
citadel/modules/smtp/serv_smtpeventclient.c
@@
-255,7
+255,7
@@
eNextState Terminate(AsyncIO *IO)
eNextState FinalizeMessageSend(SmtpOutMsg *Msg)
{
/* hand over to DB Queue */
eNextState FinalizeMessageSend(SmtpOutMsg *Msg)
{
/* hand over to DB Queue */
- return EventQueueDBOperation(&Msg->IO, FinalizeMessageSend_DB);
+ return EventQueueDBOperation(&Msg->IO, FinalizeMessageSend_DB
, 0
);
}
eNextState FailOneAttempt(AsyncIO *IO)
}
eNextState FailOneAttempt(AsyncIO *IO)