LCOV - code coverage report
Current view: top level - providers/data_provider - dp_target_subdomains.c (source / functions) Hit Total Coverage
Test: coverage.info Lines: 0 8 0.0 %
Date: 2016-06-29 Functions: 0 1 0.0 %

          Line data    Source code
       1             : /*
       2             :     Authors:
       3             :         Pavel Březina <pbrezina@redhat.com>
       4             : 
       5             :     Copyright (C) 2016 Red Hat
       6             : 
       7             :     This program is free software; you can redistribute it and/or modify
       8             :     it under the terms of the GNU General Public License as published by
       9             :     the Free Software Foundation; either version 3 of the License, or
      10             :     (at your option) any later version.
      11             : 
      12             :     This program is distributed in the hope that it will be useful,
      13             :     but WITHOUT ANY WARRANTY; without even the implied warranty of
      14             :     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      15             :     GNU General Public License for more details.
      16             : 
      17             :     You should have received a copy of the GNU General Public License
      18             :     along with this program.  If not, see <http://www.gnu.org/licenses/>.
      19             : */
      20             : 
      21             : #include <talloc.h>
      22             : #include <tevent.h>
      23             : 
      24             : #include "sbus/sssd_dbus.h"
      25             : #include "providers/data_provider/dp_private.h"
      26             : #include "providers/data_provider/dp_iface.h"
      27             : #include "providers/backend.h"
      28             : #include "util/util.h"
      29             : 
      30           0 : errno_t dp_subdomains_handler(struct sbus_request *sbus_req,
      31             :                               void *dp_cli,
      32             :                               const char *domain_hint)
      33             : {
      34             :     struct dp_subdomains_data *data;
      35             :     const char *key;
      36             : 
      37           0 :     data = talloc_zero(sbus_req, struct dp_subdomains_data);
      38           0 :     if (data == NULL) {
      39           0 :         return ENOMEM;
      40             :     }
      41             : 
      42           0 :     data->domain_hint = domain_hint;
      43           0 :     key = SBUS_IS_STRING_EMPTY(domain_hint) ? "<ALL>" : domain_hint;
      44             : 
      45           0 :     dp_req_with_reply(dp_cli, NULL, "Subdomains", key, sbus_req,
      46             :                       DPT_SUBDOMAINS, DPM_DOMAINS_HANDLER, 0, data,
      47             :                       dp_req_reply_std, struct dp_reply_std);
      48             : 
      49           0 :     return EOK;
      50             : }

Generated by: LCOV version 1.10