ws-sandesha-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dami...@apache.org
Subject svn commit: r602623 - in /webservices/sandesha/trunk/c: include/sandesha2_msg_retrans_adjuster.h src/util/msg_retrans_adjuster.c src/workers/sender_worker.c
Date Sun, 09 Dec 2007 03:51:37 GMT
Author: damitha
Date: Sat Dec  8 19:51:36 2007
New Revision: 602623

URL: http://svn.apache.org/viewvc?rev=602623&view=rev
Log:
Code cleaning

Modified:
    webservices/sandesha/trunk/c/include/sandesha2_msg_retrans_adjuster.h
    webservices/sandesha/trunk/c/src/util/msg_retrans_adjuster.c
    webservices/sandesha/trunk/c/src/workers/sender_worker.c

Modified: webservices/sandesha/trunk/c/include/sandesha2_msg_retrans_adjuster.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_msg_retrans_adjuster.h?rev=602623&r1=602622&r2=602623&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_msg_retrans_adjuster.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_msg_retrans_adjuster.h Sat Dec  8 19:51:36
2007
@@ -45,7 +45,7 @@
 AXIS2_EXTERN axis2_bool_t AXIS2_CALL
 sandesha2_msg_retrans_adjuster_adjust_retrans(
     const axutil_env_t *env,
-    sandesha2_sender_bean_t *retrans_bean,
+    sandesha2_sender_bean_t *sender_bean,
     axis2_conf_ctx_t *conf_ctx, 
     sandesha2_storage_mgr_t *storage_mgr);
 

Modified: webservices/sandesha/trunk/c/src/util/msg_retrans_adjuster.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/util/msg_retrans_adjuster.c?rev=602623&r1=602622&r2=602623&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/util/msg_retrans_adjuster.c (original)
+++ webservices/sandesha/trunk/c/src/util/msg_retrans_adjuster.c Sat Dec  8 19:51:36 2007
@@ -27,7 +27,7 @@
 sandesha2_sender_bean_t * AXIS2_CALL
 sandesha2_msg_retrans_adjuster_adjust_next_retrans_time(
     const axutil_env_t *env, 
-    sandesha2_sender_bean_t *retrans_bean, 
+    sandesha2_sender_bean_t *sender_bean, 
     sandesha2_property_bean_t *property_bean);
 
 long AXIS2_CALL
@@ -50,7 +50,7 @@
 AXIS2_EXTERN axis2_bool_t AXIS2_CALL
 sandesha2_msg_retrans_adjuster_adjust_retrans(
     const axutil_env_t *env,
-    sandesha2_sender_bean_t *retrans_bean,
+    sandesha2_sender_bean_t *sender_bean,
     axis2_conf_ctx_t *conf_ctx, 
     sandesha2_storage_mgr_t *storage_mgr)
 {
@@ -68,11 +68,11 @@
     
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, 
         "[sandesha2]Entry:sandesha2_msg_retrans_adjuster_adjust_retrans");
-    AXIS2_PARAM_CHECK(env->error, retrans_bean, AXIS2_FALSE);
+    AXIS2_PARAM_CHECK(env->error, sender_bean, AXIS2_FALSE);
     AXIS2_PARAM_CHECK(env->error, conf_ctx, AXIS2_FALSE);
     AXIS2_PARAM_CHECK(env->error, storage_mgr, AXIS2_FALSE);
     
-    stored_key = sandesha2_sender_bean_get_msg_ctx_ref_key(retrans_bean, env);
+    stored_key = sandesha2_sender_bean_get_msg_ctx_ref_key(sender_bean, env);
     if(!stored_key)
     {
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Stored Key not"
@@ -83,14 +83,14 @@
         stored_key, conf_ctx, AXIS2_FALSE);
     if(msg_ctx)
         rm_msg_ctx = sandesha2_msg_init_init_msg(env, msg_ctx);
-    int_seq_id = sandesha2_sender_bean_get_internal_seq_id(retrans_bean, env);
-    seq_id = sandesha2_sender_bean_get_seq_id(retrans_bean, env);
+    int_seq_id = sandesha2_sender_bean_get_internal_seq_id(sender_bean, env);
+    seq_id = sandesha2_sender_bean_get_seq_id(sender_bean, env);
    
     property_bean = sandesha2_utils_get_property_bean(env, 
         axis2_conf_ctx_get_conf(conf_ctx, env));
-    sent_count = sandesha2_sender_bean_get_sent_count(retrans_bean, env) + 1;
-    sandesha2_sender_bean_set_sent_count(retrans_bean, env, sent_count);
-    sandesha2_msg_retrans_adjuster_adjust_next_retrans_time(env, retrans_bean,
+    sent_count = sandesha2_sender_bean_get_sent_count(sender_bean, env) + 1;
+    sandesha2_sender_bean_set_sent_count(sender_bean, env, sent_count);
+    sandesha2_msg_retrans_adjuster_adjust_next_retrans_time(env, sender_bean,
         property_bean);
     max_attempts = sandesha2_property_bean_get_max_retrans_count(property_bean, 
         env);
@@ -105,7 +105,7 @@
         
     if(timeout_seq)
     {
-        sandesha2_sender_bean_set_send(retrans_bean, env, AXIS2_FALSE);
+        sandesha2_sender_bean_set_send(sender_bean, env, AXIS2_FALSE);
         sandesha2_msg_retrans_adjuster_finalize_timedout_seq(env, int_seq_id,
             seq_id, msg_ctx, storage_mgr);
         continue_sending = AXIS2_FALSE;
@@ -118,7 +118,7 @@
 sandesha2_sender_bean_t * AXIS2_CALL
 sandesha2_msg_retrans_adjuster_adjust_next_retrans_time(
     const axutil_env_t *env, 
-    sandesha2_sender_bean_t *retrans_bean, 
+    sandesha2_sender_bean_t *sender_bean, 
     sandesha2_property_bean_t *property_bean)
 {
     int count = -1;
@@ -129,10 +129,10 @@
    
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, 
         "[sandesha2]Entry:sandesha2_msg_retrans_adjuster_adjust_next_retrans_time");
-    AXIS2_PARAM_CHECK(env->error, retrans_bean, NULL);
+    AXIS2_PARAM_CHECK(env->error, sender_bean, NULL);
     AXIS2_PARAM_CHECK(env->error, property_bean, NULL);
     
-    count = sandesha2_sender_bean_get_sent_count(retrans_bean, env);
+    count = sandesha2_sender_bean_get_sent_count(sender_bean, env);
     base_interval = sandesha2_property_bean_get_retrans_interval(property_bean,
         env);
     new_interval = base_interval;
@@ -144,10 +144,10 @@
     time_now = sandesha2_utils_get_current_time_in_millis(env);
     
     new_time_to_send = time_now + new_interval;
-    sandesha2_sender_bean_set_time_to_send(retrans_bean, env, new_time_to_send);
+    sandesha2_sender_bean_set_time_to_send(sender_bean, env, new_time_to_send);
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, 
         "[sandesha2]Exit:sandesha2_msg_retrans_adjuster_adjust_next_retrans_time");
-    return retrans_bean;
+    return sender_bean;
 }
 
 
@@ -183,7 +183,6 @@
     conf_ctx = axis2_msg_ctx_get_conf_ctx(msg_ctx, env);
     ctx = axis2_conf_ctx_get_base(conf_ctx, env);
     
-    /* we have to callback listener here */
     sandesha2_terminate_mgr_time_out_sending_side_seq(env, conf_ctx, int_seq_id,
         AXIS2_FALSE, storage_mgr);
  

Modified: webservices/sandesha/trunk/c/src/workers/sender_worker.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/workers/sender_worker.c?rev=602623&r1=602622&r2=602623&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/workers/sender_worker.c (original)
+++ webservices/sandesha/trunk/c/src/workers/sender_worker.c Sat Dec  8 19:51:36 2007
@@ -47,11 +47,9 @@
 struct sandesha2_sender_worker_t
 {
 	axis2_conf_ctx_t *conf_ctx;
-    axutil_thread_mutex_t *mutex;
     axis2_char_t *msg_id;
     axis2_msg_ctx_t *msg_ctx;
     axis2_transport_out_desc_t *transport_out;
-    axis2_status_t status;
     axis2_bool_t persistent_msg_ctx;
 };
 
@@ -105,15 +103,10 @@
         return NULL;
 	}
     sender_worker->conf_ctx = conf_ctx;
-    sender_worker->mutex = NULL;
     sender_worker->msg_id = axutil_strdup(env, msg_id);
     sender_worker->msg_ctx = NULL;
     sender_worker->transport_out = NULL;
-    sender_worker->status = AXIS2_FAILURE;
     
-    sender_worker->mutex = axutil_thread_mutex_create(env->allocator,
-                        AXIS2_THREAD_MUTEX_DEFAULT);
-                        
 	return sender_worker;
 }
 
@@ -136,15 +129,10 @@
         return NULL;
 	}
     sender_worker->conf_ctx = conf_ctx;
-    sender_worker->mutex = NULL;
     sender_worker->msg_id = axutil_strdup(env, msg_id);
     sender_worker->msg_ctx = msg_ctx;
     sender_worker->transport_out = NULL;
-    sender_worker->status = AXIS2_FAILURE;
     
-    sender_worker->mutex = axutil_thread_mutex_create(env->allocator,
-                        AXIS2_THREAD_MUTEX_DEFAULT);
-                        
 	return sender_worker;
 }
 
@@ -166,11 +154,6 @@
     /* Do not free this */
     sender_worker->conf_ctx = NULL;
     
-    if(sender_worker->mutex)
-    {
-        axutil_thread_mutex_destroy(sender_worker->mutex);
-        sender_worker->mutex = NULL;
-    }
     if(sender_worker->msg_id)
     {
         AXIS2_FREE(env->allocator, sender_worker->msg_id);



---------------------------------------------------------------------
To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: sandesha-dev-help@ws.apache.org


Mime
View raw message