You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by tr...@apache.org on 2013/07/11 23:28:47 UTC
svn commit: r1502372 - in /qpid/proton/trunk/proton-c:
include/proton/driver.h src/posix/driver.c
Author: tross
Date: Thu Jul 11 21:28:47 2013
New Revision: 1502372
URL: http://svn.apache.org/r1502372
Log:
PROTON-349 - Added name accessor for pn_connector_t
Modified:
qpid/proton/trunk/proton-c/include/proton/driver.h
qpid/proton/trunk/proton-c/src/posix/driver.c
Modified: qpid/proton/trunk/proton-c/include/proton/driver.h
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/include/proton/driver.h?rev=1502372&r1=1502371&r2=1502372&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/include/proton/driver.h (original)
+++ qpid/proton/trunk/proton-c/include/proton/driver.h Thu Jul 11 21:28:47 2013
@@ -287,7 +287,6 @@ PN_EXTERN void pn_connector_set_connecti
* connector.
*
* @param[in] connector the connector whose context is to be returned.
-
* @return the application context that was passed to pn_connector()
* or pn_connector_fd()
*/
@@ -301,6 +300,13 @@ PN_EXTERN void *pn_connector_context(pn_
*/
PN_EXTERN void pn_connector_set_context(pn_connector_t *connector, void *context);
+/** Access the name of the connector
+ *
+ * @param[in] connector the connector which will hole the name
+ * @return the name of the connector in the form of a null-terminated character string.
+ */
+PN_EXTERN const char *pn_connector_name(const pn_connector_t *connector);
+
/** Access the transport used by this connector.
*
* @param[in] connector connector whose transport will be returned
Modified: qpid/proton/trunk/proton-c/src/posix/driver.c
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/src/posix/driver.c?rev=1502372&r1=1502371&r2=1502372&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/src/posix/driver.c (original)
+++ qpid/proton/trunk/proton-c/src/posix/driver.c Thu Jul 11 21:28:47 2013
@@ -463,6 +463,12 @@ void pn_connector_set_context(pn_connect
ctor->context = context;
}
+const char *pn_connector_name(const pn_connector_t *ctor)
+{
+ if (!ctor) return 0;
+ return ctor->name;
+}
+
pn_listener_t *pn_connector_listener(pn_connector_t *ctor)
{
return ctor ? ctor->listener : NULL;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org