[Freeswitch-branches] [commit] r10771 - in freeswitch/branches/gmaruzz/src: . include mod/endpoints/mod_skypiax

FreeSWITCH SVN gmaruzz at freeswitch.org
Mon Dec 15 09:26:36 PST 2008


Author: gmaruzz
Date: Mon Dec 15 12:26:36 2008
New Revision: 10771

Log:
skypiax: prepare for merging with trunk, cleaning the switch_apr.c and switch_apr.h files

Modified:
   freeswitch/branches/gmaruzz/src/include/switch_apr.h
   freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/skypiax_protocol.c
   freeswitch/branches/gmaruzz/src/switch_apr.c

Modified: freeswitch/branches/gmaruzz/src/include/switch_apr.h
==============================================================================
--- freeswitch/branches/gmaruzz/src/include/switch_apr.h	(original)
+++ freeswitch/branches/gmaruzz/src/include/switch_apr.h	Mon Dec 15 12:26:36 2008
@@ -1303,7 +1303,17 @@
 
 SWITCH_DECLARE(switch_status_t) switch_match_glob(const char *pattern, switch_array_header_t **result, switch_memory_pool_t *p);
 SWITCH_DECLARE(switch_status_t) switch_socket_addr_get(switch_sockaddr_t **sa, switch_bool_t remote, switch_socket_t *sock);
-SWITCH_DECLARE(switch_status_t) switch_file_pipe_create_ex(switch_file_t **in, switch_file_t **out, int32_t   blocking, switch_memory_pool_t *p);
+
+/**
+ * Create an anonymous pipe.
+ * @param in The file descriptor to use as input to the pipe.
+ * @param out The file descriptor to use as output from the pipe.
+ * @param pool The pool to operate on.
+ * @remark By default, the returned file descriptors will be inherited
+ * by child processes created using apr_proc_create().  This can be
+ * changed using apr_file_inherit_unset().
+ */
+SWITCH_DECLARE(switch_status_t) switch_file_pipe_create(switch_file_t **in, switch_file_t **out, switch_memory_pool_t *p);
 
 /**
  * Get the timeout value for a pipe or manipulate the blocking state.

Modified: freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/skypiax_protocol.c
==============================================================================
--- freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/skypiax_protocol.c	(original)
+++ freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/skypiax_protocol.c	Mon Dec 15 12:26:36 2008
@@ -344,16 +344,14 @@
   switch_status_t rv;
 
   rv =
-    switch_file_pipe_create_ex(&p->audiopipe[0], &p->audiopipe[1], 2,
-                               skypiax_module_pool);
+    switch_file_pipe_create(&p->audiopipe[0], &p->audiopipe[1], skypiax_module_pool);
   rv = switch_file_pipe_timeout_set(p->audiopipe[0], 100000);
 
 /* the pipe is our audio fd for pbx to poll on */
   p->skypiax_sound_capt_fd = p->audiopipe[0];
 
   rv =
-    switch_file_pipe_create_ex(&p->audioskypepipe[0], &p->audioskypepipe[1], 2,
-                               skypiax_module_pool);
+    switch_file_pipe_create(&p->audioskypepipe[0], &p->audioskypepipe[1], skypiax_module_pool);
   rv = switch_file_pipe_timeout_set(p->audioskypepipe[0], 100);
   if (option_debug > 10) {
     DEBUGA_PBX("EXITING FUNC\n", SKYPIAX_P_LOG);
@@ -596,8 +594,7 @@
   //DWORD MsgWaitResult;
   p = obj;
 
-  switch_file_pipe_create_ex(&p->AsteriskHandlesAst.fdesc[0],
-                             &p->AsteriskHandlesAst.fdesc[1], 2, skypiax_module_pool);
+  switch_file_pipe_create(&p->AsteriskHandlesAst.fdesc[0], &p->AsteriskHandlesAst.fdesc[1], skypiax_module_pool);
   switch_file_pipe_timeout_set(p->AsteriskHandlesAst.fdesc[0], 100000);
 
   win32_AsteriskHandlesSkype = &p->AsteriskHandlesAst;
@@ -780,8 +777,7 @@
   p = obj;
   DEBUGA_PBX("ENTERING FUNC\n", SKYPIAX_P_LOG);
 
-  switch_file_pipe_create_ex(&p->AsteriskHandlesAst.fdesc[0],
-                             &p->AsteriskHandlesAst.fdesc[1], 2, skypiax_module_pool);
+  switch_file_pipe_create(&p->AsteriskHandlesAst.fdesc[0], &p->AsteriskHandlesAst.fdesc[1], skypiax_module_pool);
 
   switch_file_pipe_timeout_set(p->AsteriskHandlesAst.fdesc[0], 100000);
   AsteriskHandlesAst = &p->AsteriskHandlesAst;

Modified: freeswitch/branches/gmaruzz/src/switch_apr.c
==============================================================================
--- freeswitch/branches/gmaruzz/src/switch_apr.c	(original)
+++ freeswitch/branches/gmaruzz/src/switch_apr.c	Mon Dec 15 12:26:36 2008
@@ -942,9 +942,17 @@
 	return apr_match_glob(pattern, (apr_array_header_t **) result, p);
 }
 
-SWITCH_DECLARE(switch_status_t) switch_file_pipe_create_ex(switch_file_t **in, switch_file_t **out, int32_t   blocking, switch_memory_pool_t *p)
+/**
+ * Create an anonymous pipe.
+ * @param in The file descriptor to use as input to the pipe.
+ * @param out The file descriptor to use as output from the pipe.
+ * @param pool The pool to operate on.
+ * @remark By default, the returned file descriptors will be inherited
+ * by child processes created using apr_proc_create().  This can be
+ * changed using apr_file_inherit_unset().
+ */
+SWITCH_DECLARE(switch_status_t) switch_file_pipe_create(switch_file_t **in, switch_file_t **out, switch_memory_pool_t *p)
 {
-    //return apr_file_pipe_create_ex  ((apr_file_t **) in, (apr_file_t **) out, blocking, p);
     return apr_file_pipe_create ((apr_file_t **) in, (apr_file_t **) out, p);
 }
 



More information about the Freeswitch-branches mailing list