LCOV - code coverage report
Current view: top level - home/jelte/repos/coverage_bind10/src/bin/auth - common.cc (source / functions) Hit Total Coverage
Test: report.info Lines: 9 9 100.0 %
Date: 2012-05-15 Functions: 1 1 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 8 10 80.0 %

           Branch data     Line data    Source code
       1                 :            : // Copyright (C) 2009-2011  Internet Systems Consortium, Inc. ("ISC")
       2                 :            : //
       3                 :            : // Permission to use, copy, modify, and/or distribute this software for any
       4                 :            : // purpose with or without fee is hereby granted, provided that the above
       5                 :            : // copyright notice and this permission notice appear in all copies.
       6                 :            : //
       7                 :            : // THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
       8                 :            : // REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
       9                 :            : // AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
      10                 :            : // INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
      11                 :            : // LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
      12                 :            : // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
      13                 :            : // PERFORMANCE OF THIS SOFTWARE.
      14                 :            : 
      15                 :            : #include <string>
      16                 :            : 
      17                 :            : #include <auth/common.h>
      18                 :            : #include <auth/spec_config.h>
      19                 :            : #include <stdlib.h>
      20                 :            : 
      21                 :            : using std::string;
      22                 :            : 
      23                 :            : string
      24                 :          4 : getXfroutSocketPath() {
      25         [ +  + ]:          4 :     if (getenv("B10_FROM_BUILD") != NULL) {
      26         [ +  + ]:          2 :         if (getenv("B10_FROM_SOURCE_LOCALSTATEDIR") != NULL) {
      27                 :          2 :             return (string(getenv("B10_FROM_SOURCE_LOCALSTATEDIR")) +
      28         [ +  - ]:          1 :                     "/auth_xfrout_conn");
      29                 :            :         } else {
      30         [ +  - ]:          1 :             return (string(getenv("B10_FROM_BUILD")) + "/auth_xfrout_conn");
      31                 :            :         }
      32                 :            :     } else {
      33         [ +  + ]:          2 :         if (getenv("BIND10_XFROUT_SOCKET_FILE") != NULL) {
      34                 :          1 :             return (getenv("BIND10_XFROUT_SOCKET_FILE"));
      35                 :            :         } else {
      36                 :          4 :             return (UNIX_SOCKET_FILE);
      37                 :            :         }
      38                 :            :     }
      39                 :            : }
      40                 :            : 
      41                 :            : const char* const AUTH_NAME = "b10-auth";

Generated by: LCOV version 1.9