data_provider_callbacks.c revision bb1487fef5d19a7b1536fc42e25a08f7d4c43e1b
/*
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;
/* Call the callback */
/* 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;
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;
}
/* 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 {
}
}
}
{
}
int ret;
if (be->offline_cb_list) {
}
} else {
}
}