You are viewing a plain text version of this content. The canonical link for it is here.
Posted to savan-dev@ws.apache.org by da...@apache.org on 2007/09/07 09:29:45 UTC

svn commit: r573493 - in /webservices/savan/trunk/c/src: subs_mgr/subs_mgr.c util/savan_util.c

Author: damitha
Date: Fri Sep  7 00:29:44 2007
New Revision: 573493

URL: http://svn.apache.org/viewvc?rev=573493&view=rev
Log:
Improving performance

Modified:
    webservices/savan/trunk/c/src/subs_mgr/subs_mgr.c
    webservices/savan/trunk/c/src/util/savan_util.c

Modified: webservices/savan/trunk/c/src/subs_mgr/subs_mgr.c
URL: http://svn.apache.org/viewvc/webservices/savan/trunk/c/src/subs_mgr/subs_mgr.c?rev=573493&r1=573492&r2=573493&view=diff
==============================================================================
--- webservices/savan/trunk/c/src/subs_mgr/subs_mgr.c (original)
+++ webservices/savan/trunk/c/src/subs_mgr/subs_mgr.c Fri Sep  7 00:29:44 2007
@@ -272,7 +272,6 @@
 
     axis2_svc_t *subs_svc = NULL;
     axutil_param_t *param = NULL;
-    axis2_char_t *topic_url = NULL;
     axutil_hash_t *subs_store = NULL;
     axiom_namespace_t *ns = NULL;
     axiom_namespace_t *ns1 = NULL;
@@ -363,7 +362,6 @@
     subscriber = axutil_hash_get(subs_store, subs_id, AXIS2_HASH_KEY_STRING);
     if (subscriber)
     {
-        axiom_node_t *topic_node = NULL;
         axiom_node_t *sub_node = NULL;
         axiom_node_t *endto_node = NULL;
         axiom_node_t *id_node = NULL;
@@ -373,7 +371,6 @@
         axiom_node_t *expires_node = NULL;
         axiom_element_t* sub_elem = NULL;
         axiom_element_t* id_elem = NULL;
-        axiom_element_t* topic_elem = NULL;
         axiom_element_t* endto_elem = NULL;
         axiom_element_t* delivery_elem = NULL;
         axiom_element_t* notify_elem = NULL;
@@ -385,13 +382,6 @@
         const axis2_char_t *expires = NULL;
         axis2_char_t *id = NULL;
 
-        topic_elem = axiom_element_create(env, subs_node, 
-            ELEM_NAME_TOPIC, ns1, &topic_node);
-        topic_url = savan_subscriber_get_topic(subscriber, env);
-        if(topic_url)
-        {
-            axiom_element_set_text(topic_elem, env, topic_url, topic_node); 
-        }
         axis2_endpoint_ref_t *endto_ref = savan_subscriber_get_end_to(subscriber, env);
         endto = axis2_endpoint_ref_get_address(endto_ref, env);
         axis2_endpoint_ref_t *notify_ref = savan_subscriber_get_notify_to(subscriber, env);

Modified: webservices/savan/trunk/c/src/util/savan_util.c
URL: http://svn.apache.org/viewvc/webservices/savan/trunk/c/src/util/savan_util.c?rev=573493&r1=573492&r2=573493&view=diff
==============================================================================
--- webservices/savan/trunk/c/src/util/savan_util.c (original)
+++ webservices/savan/trunk/c/src/util/savan_util.c Fri Sep  7 00:29:44 2007
@@ -883,13 +883,15 @@
 static savan_subscriber_t *
 process_subscriber_node(
     const axutil_env_t *env,
-    axiom_node_t *sub_node)
+    axiom_node_t *node)
 {
+    axiom_node_t *sub_node = NULL;
     axiom_element_t *sub_elem = NULL;
     axutil_qname_t *qname = NULL;
     axis2_char_t *topic_url = NULL;
     savan_subscriber_t *subscriber = NULL;
 
+    sub_node = axiom_node_get_first_child(node, env);
     AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, 
         "[SAVAN] Start:process_subscriber_node");
     sub_elem = axiom_node_get_data_element(sub_node, env); 
@@ -922,8 +924,8 @@
         subscriber = savan_subscriber_create(env);
         if (!subscriber)
         {
-            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[SAVAN] Failed to create a"
-                "subscriber instance");
+            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
+                "[SAVAN] Failed to create a subscriber instance");
             return NULL;
         }
         /* Now read each sub element of Subscribe element */
@@ -938,6 +940,8 @@
         axutil_qname_free(qname, env);
         id = axiom_element_get_text(id_elem, env, id_node);
         savan_subscriber_set_id(subscriber, env, id);
+        AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, 
+            "[SAVAN] Received subscriber id:%s", id);
 
         /* EndTo */
         qname = axutil_qname_create(env, ELEM_NAME_ENDTO, EVENTING_NAMESPACE, NULL);
@@ -962,6 +966,8 @@
             delivery_node, &notify_node);
         axutil_qname_free(qname, env);
         notify = axiom_element_get_text(notify_elem, env, notify_node);
+        AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, 
+            "[SAVAN] Received notify address:%s", notify);
 
         notify_epr = axis2_endpoint_ref_create(env, notify);