LCOV - code coverage report
Current view: top level - responder/common/data_provider - rdp_client.c (source / functions) Hit Total Coverage
Test: coverage.info Lines: 0 13 0.0 %
Date: 2016-06-29 Functions: 0 2 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 "responder/common/data_provider/rdp.h"
      22             : #include "util/util.h"
      23             : 
      24             : static void rdp_register_client_done(struct tevent_req *req);
      25             : 
      26           0 : errno_t rdp_register_client(struct be_conn *be_conn,
      27             :                             const char *client_name)
      28             : {
      29             :     struct tevent_req *req;
      30             : 
      31           0 :     req = rdp_message_send(be_conn, be_conn->rctx, be_conn->domain,
      32             :                            DP_PATH, IFACE_DP_CLIENT, IFACE_DP_CLIENT_REGISTER,
      33             :                            DBUS_TYPE_STRING, &client_name);
      34           0 :     if (req == NULL) {
      35           0 :         return ENOMEM;
      36             :     }
      37             : 
      38           0 :     tevent_req_set_callback(req, rdp_register_client_done, NULL);
      39             : 
      40           0 :     return EOK;
      41             : }
      42             : 
      43           0 : static void rdp_register_client_done(struct tevent_req *req)
      44             : {
      45             :     errno_t ret;
      46             : 
      47           0 :     ret = rdp_message_recv(req);
      48           0 :     talloc_zfree(req);
      49           0 :     if (ret != EOK) {
      50           0 :         DEBUG(SSSDBG_CRIT_FAILURE, "Unable to register client with DP\n");
      51           0 :         return;
      52             :     }
      53             : 
      54           0 :     DEBUG(SSSDBG_TRACE_FUNC, "Client is registered with DP\n");
      55             : }

Generated by: LCOV version 1.10