[Freeswitch-trunk] [commit] r12556 - in freeswitch/trunk/libs/sofia-sip: . libsofia-sip-ua/nta libsofia-sip-ua/nta/sofia-sip
FreeSWITCH SVN
mikej at freeswitch.org
Tue Mar 10 12:57:32 PDT 2009
Author: mikej
Date: Tue Mar 10 14:57:32 2009
New Revision: 12556
Log:
Wed Mar 4 12:22:52 CST 2009 Pekka Pessi <first.last at nokia.com>
* nta: add nta_outgoing_magic()
Modified:
freeswitch/trunk/libs/sofia-sip/.update
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sofia-sip/nta.h
Modified: freeswitch/trunk/libs/sofia-sip/.update
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/.update (original)
+++ freeswitch/trunk/libs/sofia-sip/.update Tue Mar 10 14:57:32 2009
@@ -1 +1 @@
-Tue Mar 10 14:55:35 CDT 2009
+Tue Mar 10 14:56:15 CDT 2009
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 Tue Mar 10 14:57:32 2009
@@ -7414,6 +7414,28 @@
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.
*
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 Tue Mar 10 14:57:32 2009
@@ -393,6 +393,8 @@
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);
More information about the Freeswitch-trunk
mailing list