Merge branch 'master' of gitea.larke.org:kevin/libcw
This commit is contained in:
commit
31d32e0b7c
@ -183,7 +183,7 @@ cw::rc_t cw::gutim::reg::create( handle_t& hRef, const char* fname )
|
||||
|
||||
errLabel:
|
||||
if(rc != kOkRC )
|
||||
rc = _destroy(p);
|
||||
_destroy(p);
|
||||
|
||||
destroy(csvH);
|
||||
|
||||
@ -248,3 +248,30 @@ void cw::gutim::reg::report( handle_t h )
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
cw::rc_t cw::gutim::reg::test( const object_t* cfg )
|
||||
{
|
||||
const char* dir = nullptr;
|
||||
rc_t rc = kOkRC;
|
||||
handle_t h;
|
||||
|
||||
if((rc = cfg->getv("dir",dir)) != kOkRC )
|
||||
{
|
||||
rc = cwLogError(rc,"The arg. parse GUTIM registry test.");
|
||||
goto errLabel;
|
||||
}
|
||||
|
||||
if((rc = create(h,dir)) != kOkRC )
|
||||
{
|
||||
rc = cwLogError(rc,"The GUTIM registry create failed.");
|
||||
goto errLabel;
|
||||
}
|
||||
|
||||
report(h);
|
||||
|
||||
errLabel:
|
||||
destroy(h);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ namespace cw
|
||||
file_t file_record( handle_t h, unsigned file_idx );
|
||||
|
||||
void report( handle_t h );
|
||||
|
||||
rc_t test( const object_t* cfg );
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -144,6 +144,9 @@ namespace cw
|
||||
}
|
||||
|
||||
|
||||
// TODO: Consider replacing the poll() with epoll_wait2() is apparently
|
||||
// optimized for more accurate time outs.
|
||||
|
||||
// Block here waiting for ALSA events or timeout when the next file msg should be sent
|
||||
int sysRC = poll( p->alsaPollfdA, p->alsaPollfdN, sleep_millis );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user