[asterisk-commits] tzafrir: branch tzafrir/monitor-rtp r214065 - in /team/tzafrir/monitor-rtp: i...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Aug 25 13:53:15 CDT 2009


Author: tzafrir
Date: Tue Aug 25 13:53:11 2009
New Revision: 214065

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=214065
Log:
expose the filename of a struct ast_filestream

This commit adds the (temporaily-named)
ast_filestream_xxx_get_filename(),
which returns the filename field of a ast_filestream structure.

This is the one used for now, until we have a proper interface for a
file-descriptor ast_filestream.

Modified:
    team/tzafrir/monitor-rtp/include/asterisk/file.h
    team/tzafrir/monitor-rtp/main/file.c

Modified: team/tzafrir/monitor-rtp/include/asterisk/file.h
URL: http://svn.asterisk.org/svn-view/asterisk/team/tzafrir/monitor-rtp/include/asterisk/file.h?view=diff&rev=214065&r1=214064&r2=214065
==============================================================================
--- team/tzafrir/monitor-rtp/include/asterisk/file.h (original)
+++ team/tzafrir/monitor-rtp/include/asterisk/file.h Tue Aug 25 13:53:11 2009
@@ -208,6 +208,14 @@
  */
 int ast_writestream(struct ast_filestream *fs, struct ast_frame *f);
 
+/*! \brief Returns the raw name of a filestream
+ *
+ * \fixme This function needlessly exposes an internal structure.
+ * We should probably provide a better interface for using file
+ * descriptors / sockets rather than exposing it.
+ */
+char* ast_filestream_xxx_get_filename(struct ast_filestream *stream);
+
 /*! 
  * \brief Closes a stream 
  * \param f filestream to close

Modified: team/tzafrir/monitor-rtp/main/file.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/tzafrir/monitor-rtp/main/file.c?view=diff&rev=214065&r1=214064&r2=214065
==============================================================================
--- team/tzafrir/monitor-rtp/main/file.c (original)
+++ team/tzafrir/monitor-rtp/main/file.c Tue Aug 25 13:53:11 2009
@@ -334,6 +334,17 @@
 	if (f->orig_chan_name)
 		free((void *) f->orig_chan_name);
 	ast_module_unref(f->fmt->module);
+}
+
+/*! \brief Returns the raw name of a filestream
+ *
+ * \fixme This function needlessly exposes an internal structure.
+ * We should probably provide a better interface for using file
+ * descriptors / sockets rather than exposing it.
+ */
+char* ast_filestream_xxx_get_filename(struct ast_filestream *fs)
+{
+	return fs->filename;
 }
 
 static struct ast_filestream *get_filestream(struct ast_format *fmt, FILE *bfile)




More information about the asterisk-commits mailing list