Ignore:
Timestamp:
May 27, 2009, 11:39:15 AM (16 years ago)
Author:
Herwig Bauernfeind
Message:

Update 3.2 branch to 3.2.9

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.2.x/source/lib/dbwrap.c

    r133 r233  
    4343}
    4444
     45bool db_is_local(const char *name)
     46{
     47#ifdef CLUSTER_SUPPORT
     48        const char *sockname = lp_ctdbd_socket();
     49
     50        if(!sockname || !*sockname) {
     51                sockname = CTDB_PATH;
     52        }
     53
     54        if (lp_clustering() && socket_exist(sockname)) {
     55                const char *partname;
     56                /* ctdb only wants the file part of the name */
     57                partname = strrchr(name, '/');
     58                if (partname) {
     59                        partname++;
     60                } else {
     61                        partname = name;
     62                }
     63                /* allow ctdb for individual databases to be disabled */
     64                if (lp_parm_bool(-1, "ctdb", partname, True)) {
     65                        return false;
     66                }
     67        }
     68#endif
     69        return true;
     70}
     71
    4572/**
    4673 * If you need transaction support use db_open_trans()
Note: See TracChangeset for help on using the changeset viewer.