[asterisk-commits] oej: trunk r89564 - in /trunk: include/asterisk/channel.h main/channel.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Nov 25 13:33:34 CST 2007


Author: oej
Date: Sun Nov 25 13:33:33 2007
New Revision: 89564

URL: http://svn.digium.com/view/asterisk?view=rev&rev=89564
Log:
Try to get channel.h and channel.c aligned in regards to ast_set_callerid as well
as change name of variables to follow the rest of the naming.

Modified:
    trunk/include/asterisk/channel.h
    trunk/main/channel.c

Modified: trunk/include/asterisk/channel.h
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/channel.h?view=diff&rev=89564&r1=89563&r2=89564
==============================================================================
--- trunk/include/asterisk/channel.h (original)
+++ trunk/include/asterisk/channel.h Sun Nov 25 13:33:33 2007
@@ -712,16 +712,30 @@
  * \param data data to pass to the channel requester
  * \param timeout maximum amount of time to wait for an answer
  * \param reason why unsuccessful (if unsuccessful)
- * \param cidnum Caller-ID Number
- * \param cidname Caller-ID Name
+ * \param cid_num Caller-ID Number
+ * \param cid_name Caller-ID Name (ascii)
  * \return Returns an ast_channel on success or no answer, NULL on failure.  Check the value of chan->_state
  * to know if the call was answered or not.
  */
 struct ast_channel *ast_request_and_dial(const char *type, int format, void *data,
-	int timeout, int *reason, const char *cidnum, const char *cidname);
-
+	int timeout, int *reason, const char *cid_num, const char *cid_name);
+
+/*!
+ * \brief Request a channel of a given type, with data as optional information used 
+ * by the low level module and attempt to place a call on it
+ * \param type type of channel to request
+ * \param format requested channel format
+ * \param data data to pass to the channel requester
+ * \param timeout maximum amount of time to wait for an answer
+ * \param reason why unsuccessful (if unsuccessful)
+ * \param cid_num Caller-ID Number
+ * \param cid_name Caller-ID Name (ascii)
+ * \param oh Outgoing helper
+ * \return Returns an ast_channel on success or no answer, NULL on failure.  Check the value of chan->_state
+ * to know if the call was answered or not.
+ */
 struct ast_channel *__ast_request_and_dial(const char *type, int format, void *data,
-	int timeout, int *reason, const char *cidnum, const char *cidname, struct outgoing_helper *oh);
+	int timeout, int *reason, const char *cid_num, const char *cid_name, struct outgoing_helper *oh);
 
 /*!\brief Register a channel technology (a new channel driver)
  * Called by a channel module to register the kind of channels it supports.
@@ -1200,7 +1214,8 @@
 /*! Deactivate an active generator */
 void ast_deactivate_generator(struct ast_channel *chan);
 
-void ast_set_callerid(struct ast_channel *chan, const char *cidnum, const char *cidname, const char *ani);
+/*! Set caller ID number, name and ANI */
+void ast_set_callerid(struct ast_channel *chan, const char *cid_num, const char *cid_name, const char *cid_ani);
 
 /*! Set the file descriptor on the channel */
 void ast_channel_set_fd(struct ast_channel *chan, int which, int fd);

Modified: trunk/main/channel.c
URL: http://svn.digium.com/view/asterisk/trunk/main/channel.c?view=diff&rev=89564&r1=89563&r2=89564
==============================================================================
--- trunk/main/channel.c (original)
+++ trunk/main/channel.c Sun Nov 25 13:33:33 2007
@@ -3755,22 +3755,22 @@
 	return 0;
 }
 
-void ast_set_callerid(struct ast_channel *chan, const char *callerid, const char *calleridname, const char *ani)
-{
-	if (callerid) {
+void ast_set_callerid(struct ast_channel *chan, const char *cid_num, const char *cid_name, const char *cid_ani)
+{
+	if (cid_num) {
 		if (chan->cid.cid_num)
 			ast_free(chan->cid.cid_num);
-		chan->cid.cid_num = ast_strdup(callerid);
-	}
-	if (calleridname) {
+		chan->cid.cid_num = ast_strdup(cid_num);
+	}
+	if (cid_name) {
 		if (chan->cid.cid_name)
 			ast_free(chan->cid.cid_name);
-		chan->cid.cid_name = ast_strdup(calleridname);
-	}
-	if (ani) {
+		chan->cid.cid_name = ast_strdup(cid_name);
+	}
+	if (cid_ani) {
 		if (chan->cid.cid_ani)
 			ast_free(chan->cid.cid_ani);
-		chan->cid.cid_ani = ast_strdup(ani);
+		chan->cid.cid_ani = ast_strdup(cid_ani);
 	}
 	if (chan->cdr)
 		ast_cdr_setcid(chan->cdr, chan);




More information about the asterisk-commits mailing list