First patch for porting to BSD systems. This patch removes the WAITALL
flag entirely from the library handlers, as it appears there may be some
portability problems with this flag. The code already handles partial
reads anyway, so it was not necessary.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@920 fd59a12c-fef9-0310-b244-a6a79926bd2f
Check return pointer from malloc for NULL. Back out any previous malloc
to eliminate memory leaks. Return proper status.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@887 fd59a12c-fef9-0310-b244-a6a79926bd2f
This fixes the event handle leak on failure, the malloc check for hl,
removes the redundant memset when creating a handle, and makes sure
that the put of the channel handle is a valid handle.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@886 fd59a12c-fef9-0310-b244-a6a79926bd2f
Fixes a problem where the dispatcher can lose track of available
events if it gets SA_ERR_TRY_AGAIN from the exec.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@883 fd59a12c-fef9-0310-b244-a6a79926bd2f
SaEvtChannelClose needed to handle SA_AIS_ERR_TRY_AGAIN so that the
eci_closing would be cleared before returning.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@800 fd59a12c-fef9-0310-b244-a6a79926bd2f
likely to get a random valid handle.
Fix a couple bugs in the event service that this change exposed.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@791 fd59a12c-fef9-0310-b244-a6a79926bd2f
tests results.
The changes may affect applications currently using the event service.
1. Timeout value to the saEvtChannelOpen call was updated to use
SA_TIME_MAX instead of 0 for infinite timeout.
2. added cleanup in the library to remove associated events when a
channel is closed, and remove associated channels when finalize is
called.
3. Added some new checking args for NULL and returning the correct error
code.
4. fixed dispatch to return correct status with SA_DISPATCH_ONE and no
available poll data.
5. Makefile had bad dependency for evt library build.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@706 fd59a12c-fef9-0310-b244-a6a79926bd2f
2005/06/15 14:09:08-07:00 osdl.net!markh
Fix version handling code to be B spec compliant.
BUG 623.
(Logical change 1.206)
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@664 fd59a12c-fef9-0310-b244-a6a79926bd2f
the finalize function. This allows threads waiting on poll to
wake up and release handle references.
(Logical change 1.205)
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@662 fd59a12c-fef9-0310-b244-a6a79926bd2f
deadlock situtation. The problem would occur when I would kill aisexec
while my program was running (using EVT and CLM apis). My program is
multi-threaded where 1 thread is calling evtDispatch and other threads
can be calling evtPublish at various times. The problem I ran into is when I
killed aisexec, the evtDispatch would take a lock, but never give it back.
At the same time, my sending thread would call evtPublish which would take
the lock and hang since evtDispatch never gave up the lock it took.
The fix was to add a few unlocks in evt.c where they appeared to be missing.
Here is the info:
1) line 504 in evt.c (lib dir) calls
pthread_mutex_unlock(&evti->ei_mutex);
goto error_unlock;
2) There are subsequent calls to goto error_unlock in later error statements
that do not unlock the mutex before the goto call - the lines are 534 and 541
Adding the unlock right before the goto @ 534 and @ 541 fixes the deadlock
for my scenario.
Kristen Smith
Nortel Networks
(Logical change 1.110)
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@394 fd59a12c-fef9-0310-b244-a6a79926bd2f