mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 05:02:10 +00:00
tear the hell out of everything and rip it up into itsy bitsy pieces and put it all back together
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5765 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -43,14 +43,15 @@
|
||||
|
||||
SWITCH_BEGIN_EXTERN_C
|
||||
#define SWITCH_CMD_CHUNK_LEN 1024
|
||||
#define SWITCH_STANDARD_STREAM(s) memset(&s, 0, sizeof(s)); if ((s.data = malloc(SWITCH_CMD_CHUNK_LEN))) { \
|
||||
memset(s.data, 0, SWITCH_CMD_CHUNK_LEN); \
|
||||
s.end = s.data;\
|
||||
s.data_size = SWITCH_CMD_CHUNK_LEN;\
|
||||
s.write_function = switch_console_stream_write;\
|
||||
s.alloc_len = SWITCH_CMD_CHUNK_LEN;\
|
||||
s.alloc_chunk = SWITCH_CMD_CHUNK_LEN;\
|
||||
}
|
||||
#define SWITCH_STANDARD_STREAM(s) memset(&s, 0, sizeof(s)); s.data = malloc(SWITCH_CMD_CHUNK_LEN); \
|
||||
assert(s.data); \
|
||||
memset(s.data, 0, SWITCH_CMD_CHUNK_LEN); \
|
||||
s.end = s.data; \
|
||||
s.data_size = SWITCH_CMD_CHUNK_LEN; \
|
||||
s.write_function = switch_console_stream_write; \
|
||||
s.alloc_len = SWITCH_CMD_CHUNK_LEN; \
|
||||
s.alloc_chunk = SWITCH_CMD_CHUNK_LEN
|
||||
|
||||
/*!
|
||||
\brief A simple comand loop that reads input from the terminal
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user