]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
ESL-57
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 10 Mar 2011 06:33:43 +0000 (00:33 -0600)
committerBrian West <brian@freeswitch.org>
Thu, 10 Mar 2011 06:33:43 +0000 (00:33 -0600)
libs/esl/src/esl.c

index b0bc311ce0f97a05bc7261e1f424990a8fe9f568..27000f6071b7768eade4d7074d2f2b428bbed17a 100644 (file)
@@ -934,7 +934,6 @@ ESL_DECLARE(esl_status_t) esl_recv_event(esl_handle_t *handle, int check_q, esl_
                goto fail;
        }
 
-       esl_event_safe_destroy(&handle->last_event);
        esl_event_safe_destroy(&handle->last_ievent);
        
        if (check_q && handle->race_event) {
@@ -1053,6 +1052,7 @@ ESL_DECLARE(esl_status_t) esl_recv_event(esl_handle_t *handle, int check_q, esl_
                *save_event = revent;
                revent = NULL;
        } else {
+               esl_event_safe_destroy(&handle->last_event);
                handle->last_event = revent;
        }