Rev 35 | Rev 39 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 35 | Rev 37 | ||
---|---|---|---|
Line 268... | Line 268... | ||
268 | m_fEnabled = fEnabled; |
268 | m_fEnabled = fEnabled; |
269 | 269 | ||
270 | IN_WRITE_END |
270 | IN_WRITE_END |
271 | }
|
271 | }
|
272 | 272 | ||
273 | void InotifyWatch::OnOneshotEvent() |
273 | void InotifyWatch::__Disable() |
274 | {
|
274 | {
|
275 | IN_WRITE_BEGIN |
275 | IN_WRITE_BEGIN |
276 | 276 | ||
277 | if (!m_fEnabled) { |
277 | if (!m_fEnabled) { |
278 | IN_WRITE_END_NOTHROW |
278 | IN_WRITE_END_NOTHROW |
Line 444... | Line 444... | ||
444 | while (i < len) { |
444 | while (i < len) { |
445 | struct inotify_event* pEvt = (struct inotify_event*) &m_buf[i]; |
445 | struct inotify_event* pEvt = (struct inotify_event*) &m_buf[i]; |
446 | InotifyWatch* pW = FindWatch(pEvt->wd); |
446 | InotifyWatch* pW = FindWatch(pEvt->wd); |
447 | if (pW != NULL) { |
447 | if (pW != NULL) { |
448 | InotifyEvent evt(pEvt, pW); |
448 | InotifyEvent evt(pEvt, pW); |
449 | if (InotifyEvent::IsType(pW->GetMask(), IN_ONESHOT)) |
449 | if ( InotifyEvent::IsType(pW->GetMask(), IN_ONESHOT) |
- | 450 | || InotifyEvent::IsType(evt.GetMask(), IN_IGNORED)) |
|
450 | pW->OnOneshotEvent(); |
451 | pW->__Disable(); |
451 | m_events.push_back(evt); |
452 | m_events.push_back(evt); |
452 | }
|
453 | }
|
453 | i += INOTIFY_EVENT_SIZE + (ssize_t) pEvt->len; |
454 | i += INOTIFY_EVENT_SIZE + (ssize_t) pEvt->len; |
454 | }
|
455 | }
|
455 | 456 |