Skip to content

Commit

Permalink
Improved presence property -- works for uncached
Browse files Browse the repository at this point in the history
  • Loading branch information
alfille committed Mar 18, 2015
1 parent 865b689 commit cd5419a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion module/owlib/src/c/ow_presence.c
@@ -1,5 +1,4 @@
/*
$Id$
OWFS -- One-Wire filesystem
OWHTTPD -- One-Wire Web Server
Written 2003 Paul H Alfille
Expand Down Expand Up @@ -209,6 +208,12 @@ ZERO_OR_ERROR FS_present(struct one_wire_query *owq)

if (NotRealDir(pn) || pn->selected_device == DeviceSimultaneous || pn->selected_device == DeviceThermostat) {
OWQ_Y(owq) = 1;
} else if ( IsUncachedDir(pn) ) {
struct transaction_log t[] = {
TRXN_NVERIFY,
TRXN_END,
};
OWQ_Y(owq) = BAD(BUS_transaction(t, pn)) ? 0 : 1;
} else if ( pn->selected_connection->iroutines.flags & ADAP_FLAG_presence_from_dirblob ) {
OWQ_Y(owq) = GOOD( PresenceFromDirblob(pn) ) ;
} else if ( pn->selected_connection->iroutines.flags & ADAP_FLAG_sham ) {
Expand Down
1 change: 1 addition & 0 deletions module/owlib/src/include/ow_global.h
Expand Up @@ -56,6 +56,7 @@

#define DEFAULT_USB_SCAN_INTERVAL 10 /* seconds */
#define DEFAULT_ENET_SCAN_INTERVAL 60 /* seconds */
#define DEFAULT_MASTERHUB_SCAN_INTERVAL 60 /* seconds */

enum zero_support { zero_unknown, zero_none, zero_bonjour, zero_avahi, } ;

Expand Down

0 comments on commit cd5419a

Please sign in to comment.