data_provider_callbacks.c revision 0a320004a9937295ba66a348d1e60682cfdceb26
/*
SSSD
Data Provider Process - Callback
Authors:
Stephen Gallagher <sgallagh@redhat.com>
Sumit Bose <sbose@redhat.com>
Copyright (C) 2010 Red Hat
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "providers/dp_backend.h"
struct be_cb {
void *pvt;
};
struct be_cb_ctx {
};
{
return 0;
}
{
return EINVAL;
}
if (!new_cb) {
return ENOMEM;
}
if (return_cb) {
}
return EOK;
}
{
struct tevent_timer *tev;
/* Store next callback in case this callback frees itself */
/* Call the callback */
if (next_cb) {
/* Delay 30ms so we don't block any other events */
cb_ctx);
if (!tev) {
DEBUG(0, ("Out of memory. Could not invoke callbacks\n"));
goto final;
}
return;
}
/* Steal the timer event onto the be_ctx so it doesn't
* get freed with the cb_ctx
*/
}
{
struct tevent_timer *te;
return EOK;
}
if (!cb_ctx) {
DEBUG(0, ("Out of memory. Could not invoke callbacks\n"));
return ENOMEM;
}
/* Delay 30ms so we don't block any other events */
cb_ctx);
if (!te) {
DEBUG(0, ("Out of memory. Could not invoke callbacks\n"));
return ENOMEM;
}
return EOK;
}
{
int ret;
return ret;
}
return EOK;
}
{
if (callback) {
/**
* Call the callback: we have to call this right away
* so the provider doesn't go into offline even for
* a little while
*/
do {
/* Store next callback in case this callback frees itself */
} else {
}
}
{
int ret;
return ret;
}
/* Make sure we run the callback for the first
* connection after startup.
*/
ctx->run_online_cb = true;
return EOK;
}
int ret;
if (be->run_online_cb) {
/* Reset the flag. We only want to run these
* callbacks when transitioning to online
*/
be->run_online_cb = false;
if (be->online_cb_list) {
}
} else {
}
}
}
struct be_cb **unconditional_online_cb)
{
}
{
int ret;
if (be->unconditional_online_cb_list) {
}
} else {
("List of unconditional online callbacks is empty, " \
"nothing to do.\n"));
}
}
{
}
int ret;
if (be->offline_cb_list) {
}
} else {
}
}