/*
SSSD
Data Provider Helpers
Copyright (C) Stephen Gallagher <sgallagh@redhat.com> 2009
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/>.
*/
/* Needed for res_init() */
#include <resolv.h>
#include "sbus/sssd_dbus.h"
#include "sbus/sbus_client.h"
#include "monitor/monitor_interfaces.h"
{
char *default_address;
if (default_address == NULL) {
return ENOMEM;
}
return EOK;
}
{
int type;
if (!reply) {
/* reply should never be null. This function shouldn't be called
* until reply is valid or timeout has occurred. If reply is NULL
* here, something is seriously wrong and we should bail out.
*/
"Severe error. A reply callback was called but no"
" reply was received and no timeout occurred\n");
/* FIXME: Destroy this connection ? */
goto done;
}
switch (type) {
if (!ret) {
/* FIXME: Destroy this connection ? */
goto done;
}
"Got id ack and version (%d) from Monitor\n", mon_ver);
break;
case DBUS_MESSAGE_TYPE_ERROR:
/* Falling through to default intentionally*/
default:
/*
* Timeout or other error occurred or something
* unexpected happened.
* It doesn't matter which, because either way we
* know that this connection isn't trustworthy.
* We'll destroy it now.
*/
/* FIXME: Destroy this connection ? */
break;
}
done:
}
{
int retval;
/* create the message */
return ENOMEM;
}
if (!ret) {
return EIO;
}
return retval;
}
{
int ret;
if(ret != 0) {
return EIO;
}
/* Send an empty reply to acknowledge receipt */
}
struct tevent_context *ev,
struct mon_cli_iface *mon_iface,
const char *svc_name,
void *pvt,
struct sbus_connection **mon_conn)
{
char *sbus_address;
/* Set up SBUS connection to the monitor */
return ret;
}
return ret;
}
return ret;
}
/* Identify ourselves to the monitor */
return ret;
}
return EOK;
}