[Freeswitch-svn] [commit] r7817 - in freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta: . sofia-sip

Freeswitch SVN mikej at freeswitch.org
Fri Mar 7 12:42:16 EST 2008


Author: mikej
Date: Fri Mar  7 12:42:16 2008
New Revision: 7817

Modified:
   freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta.c
   freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta_tag.c
   freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sofia-sip/nta.h

Log:
Fri Mar  7 11:34:33 EST 2008  Pekka.Pessi at nokia.com
  * nta: added nta_outgoing_bind()



Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta.c	Fri Mar  7 12:42:16 2008
@@ -6749,6 +6749,29 @@
   return NULL;
 }
 
+/**Bind callback and application context to an client transaction.
+ *
+ * @param orq       outgoing client transaction
+ * @param callback  callback function (may be NULL)
+ * @param magic     application context pointer 
+ *                  (given as argument to @a callback)
+ *
+ * @NEW_1_12_9
+ */
+SOFIAPUBFUN int nta_outgoing_bind(nta_outgoing_t *orq,
+				  nta_response_f *callback,
+				  nta_outgoing_magic_t *magic)
+{
+  if (orq && !orq->orq_destroyed) {
+    if (callback == NULL)
+      callback = outgoing_default_cb;
+    orq->orq_callback = callback;
+    orq->orq_magic = magic;
+    return 0;
+  }
+  return -1;
+}
+
 /**
  * Destroy a request object.
  *

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta_tag.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta_tag.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta_tag.c	Fri Mar  7 12:42:16 2008
@@ -103,7 +103,7 @@
  *   @ContentLength, @Via, @ContentType, @ContentDisposition,
  *   @ContentEncoding, @Supported, @Contact, @Require, @RecordRoute, @RAck,
  *   @RSeq, @Event, @Expires, @SubscriptionState, @SessionExpires,
- *   @MinSE, @SIPEtag, and @SIPIfMatch.
+ *   @MinSE, @SIPETag, and @SIPIfMatch.
  *  
  * @sa enum #sip_bad_mask, NTATAG_BAD_RESP_MASK()
  */
@@ -140,7 +140,7 @@
  *   @ContentLength, @Via, @ContentType, @ContentDisposition,
  *   @ContentEncoding, @Supported, @Contact, @Require, @RecordRoute, @RAck,
  *   @RSeq, @Event, @Expires, @SubscriptionState, @SessionExpires, 
- *   @MinSE, @SIPEtag, and @SIPIfMatch.
+ *   @MinSE, @SIPETag, and @SIPIfMatch.
  */
 tag_typedef_t ntatag_bad_resp_mask = UINTTAG_TYPEDEF(bad_resp_mask);
 
@@ -962,7 +962,7 @@
  * As per recommended by @RFC4320, the stack can generate a 100 Trying
  * response to the non-INVITE requests if the application has not responded
  * to a request within half of the SIP T2 (the default value for T2 is 4000
- * milliseconds, so the extra <i>100 Trying<i/> would be sent after 2 seconds).
+ * milliseconds, so the extra <i>100 Trying</i> would be sent after 2 seconds).
  *
  * @par Used with	
  *    nua_create(), nua_set_params(),

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sofia-sip/nta.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sofia-sip/nta.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sofia-sip/nta.h	Fri Mar  7 12:42:16 2008
@@ -383,6 +383,9 @@
 				     nta_response_f *callback,
 				     nta_outgoing_magic_t *magic);
 
+SOFIAPUBFUN int nta_outgoing_bind(nta_outgoing_t *orq,
+				  nta_response_f *callback,
+				  nta_outgoing_magic_t *magic);
 SOFIAPUBFUN int nta_outgoing_status(nta_outgoing_t const *orq);
 SOFIAPUBFUN sip_method_t nta_outgoing_method(nta_outgoing_t const *orq);
 SOFIAPUBFUN char const *nta_outgoing_method_name(nta_outgoing_t const *orq);



More information about the Freeswitch-svn mailing list