]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Wed Mar 4 12:22:52 CST 2009 Pekka Pessi <first.last@nokia.com>
authorMichael Jerris <mike@jerris.com>
Tue, 10 Mar 2009 19:57:32 +0000 (19:57 +0000)
committerMichael Jerris <mike@jerris.com>
Tue, 10 Mar 2009 19:57:32 +0000 (19:57 +0000)
  * nta: add nta_outgoing_magic()

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12556 d0543943-73ff-0310-b7d9-9358b9ac24b2

libs/sofia-sip/.update
libs/sofia-sip/libsofia-sip-ua/nta/nta.c
libs/sofia-sip/libsofia-sip-ua/nta/sofia-sip/nta.h

index 35b466fb4f02d9044f72fcc446c523749be69c8c..e9ab23232e9e57b6e2ffd429a756831b6d53568e 100644 (file)
@@ -1 +1 @@
-Tue Mar 10 14:55:35 CDT 2009
+Tue Mar 10 14:56:15 CDT 2009
index e3496a276c63bed70d565b40b1d524f842e99e1e..6108863664163ae8a227db2059606754edfa3475 100644 (file)
@@ -7414,6 +7414,28 @@ nta_outgoing_bind(nta_outgoing_t *orq,
   return -1;
 }
 
+/**Get application context bound to a client transaction.
+ *
+ * @param orq       outgoing client transaction
+ * @param callback  callback function (may be NULL)
+ *
+ * Return the application context bound to a client transaction. If the @a
+ * callback function pointer is given, return application context only if
+ * the callback matches with the callback bound to the client transaction.
+ *
+ * @NEW_1_12_11
+ */
+nta_outgoing_magic_t *
+nta_outgoing_magic(nta_outgoing_t const *orq,
+                  nta_response_f *callback)
+{
+  if (orq && (callback == NULL || callback == orq->orq_callback))
+    return orq->orq_magic;
+  else
+    return NULL;
+}
+
+
 /**
  * Destroy a request object.
  *
index bc18fa75366c8f428ec5f4a17643021e06d6ca58..c3139b65a59d994ccdbde75f51eed22db0ad687b 100644 (file)
@@ -393,6 +393,8 @@ nta_outgoing_t *nta_outgoing_default(nta_agent_t *agent,
 SOFIAPUBFUN int nta_outgoing_bind(nta_outgoing_t *orq,
                                  nta_response_f *callback,
                                  nta_outgoing_magic_t *magic);
+SOFIAPUBFUN nta_outgoing_magic_t *nta_outgoing_magic(nta_outgoing_t const *orq,
+                                                    nta_response_f *callback);
 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);