[Freeswitch-svn] [commit] r10600 - in freeswitch/branches/gmaruzz/src: . include

FreeSWITCH SVN gmaruzz at freeswitch.org
Thu Dec 4 12:46:10 PST 2008


Author: gmaruzz
Date: Thu Dec  4 15:46:10 2008
New Revision: 10600

Log:
switch_apr.c and switch_apr.h: added switch_file_pipe_timeout_set and switch_file_pipe_timeout_get

Modified:
   freeswitch/branches/gmaruzz/src/include/switch_apr.h
   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	Thu Dec  4 15:46:10 2008
@@ -1305,6 +1305,22 @@
 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);
 
+/**
+ * Get the timeout value for a pipe or manipulate the blocking state.
+ * @param thepipe The pipe we are getting a timeout for.
+ * @param timeout The current timeout value in microseconds. 
+ */
+SWITCH_DECLARE(switch_status_t) switch_file_pipe_timeout_get(switch_file_t *thepipe, switch_interval_time_t *timeout);
+
+/**
+ * Set the timeout value for a pipe or manipulate the blocking state.
+ * @param thepipe The pipe we are setting a timeout on.
+ * @param timeout The timeout value in microseconds.  Values < 0 mean wait 
+ *        forever, 0 means do not wait at all.
+ */
+SWITCH_DECLARE(switch_status_t) switch_file_pipe_timeout_set(switch_file_t *thepipe, switch_interval_time_t timeout);
+
+
  /** @} */
 
 

Modified: freeswitch/branches/gmaruzz/src/switch_apr.c
==============================================================================
--- freeswitch/branches/gmaruzz/src/switch_apr.c	(original)
+++ freeswitch/branches/gmaruzz/src/switch_apr.c	Thu Dec  4 15:46:10 2008
@@ -948,6 +948,28 @@
     return apr_file_pipe_create ((apr_file_t **) in, (apr_file_t **) out, p);
 }
 
+/**
+ * Get the timeout value for a pipe or manipulate the blocking state.
+ * @param thepipe The pipe we are getting a timeout for.
+ * @param timeout The current timeout value in microseconds. 
+ */
+SWITCH_DECLARE(switch_status_t) switch_file_pipe_timeout_get(switch_file_t *thepipe, switch_interval_time_t *timeout)
+{
+	return apr_file_pipe_timeout_get( (apr_file_t *)thepipe, (apr_interval_time_t *)timeout);
+}
+
+/**
+ * Set the timeout value for a pipe or manipulate the blocking state.
+ * @param thepipe The pipe we are setting a timeout on.
+ * @param timeout The timeout value in microseconds.  Values < 0 mean wait 
+ *        forever, 0 means do not wait at all.
+ */
+SWITCH_DECLARE(switch_status_t) switch_file_pipe_timeout_set(switch_file_t *thepipe, switch_interval_time_t timeout)
+{
+	return apr_file_pipe_timeout_set( (apr_file_t *)thepipe, (apr_interval_time_t)timeout);
+}
+
+
 /* For Emacs:
  * Local Variables:
  * mode:c



More information about the Freeswitch-svn mailing list