event socket / ESL improvements

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12228 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale committed 2009-02-21 23:19:58 +00:00
1 parent c7d6662d08
commit 99026e02e7
18 files changed
+156 -57

No files matched your search

+11 -2
View File
@@ -248,7 +248,8 @@ typedef int16_t esl_port_t;
typedef enum {
ESL_SUCCESS,
ESL_FAIL,
ESL_BREAK
ESL_BREAK,
ESL_DISCONNECTED
} esl_status_t;
#include <esl_threadmutex.h>
@@ -341,7 +342,15 @@ ESL_DECLARE(esl_status_t) esl_events(esl_handle_t *handle, esl_event_type_t etyp
#define esl_recv(_h) esl_recv_event(_h, NULL)
#define esl_recv_timed(_h, _ms) esl_recv_event_timed(_h, _ms, NULL)
#define esl_safe_strcasecmp(_s1, _s2) ((_s1) && (_s2)) ? strcasecmp((_s1), (_s2)) : 1
static __inline__ int esl_safe_strcasecmp(const char *s1, const char *s2)
{
if (!(s1 && s2)) {
return 1;
}
return strcasecmp(s1, s2);
}
#ifdef __cplusplus
}
+2
View File
@@ -106,6 +106,8 @@ typedef enum {
ESL_EVENT_GENERAL,
ESL_EVENT_COMMAND,
ESL_EVENT_SESSION_HEARTBEAT,
ESL_EVENT_CLIENT_DISCONNECTED,
ESL_EVENT_SERVER_DISCONNECTED,
ESL_EVENT_ALL
} esl_event_types_t;