|
@@ -39,14 +39,6 @@
|
|
#include "../../data_lump_rpl.h"
|
|
#include "../../data_lump_rpl.h"
|
|
|
|
|
|
|
|
|
|
-#ifdef ENABLE_ASYNC_MUTEX
|
|
|
|
-#define LOCK_ASYNC_CONTINUE(_t) lock(&(_t)->async_mutex )
|
|
|
|
-#define UNLOCK_ASYNC_CONTINUE(_t) unlock(&(_t)->async_mutex )
|
|
|
|
-#else
|
|
|
|
-#define LOCK_ASYNC_CONTINUE(_t) LOCK_REPLIES(_t)
|
|
|
|
-#define UNLOCK_ASYNC_CONTINUE(_t) UNLOCK_REPLIES(_t)
|
|
|
|
-#endif
|
|
|
|
-
|
|
|
|
/* Suspends the transaction for later use.
|
|
/* Suspends the transaction for later use.
|
|
* Save the returned hash_index and label to get
|
|
* Save the returned hash_index and label to get
|
|
* back to the SIP request processing, see the readme.
|
|
* back to the SIP request processing, see the readme.
|
|
@@ -187,11 +179,8 @@ int t_continue(unsigned int hash_index, unsigned int label,
|
|
|
|
|
|
/* The transaction has to be locked to protect it
|
|
/* The transaction has to be locked to protect it
|
|
* form calling t_continue() multiple times simultaneously */
|
|
* form calling t_continue() multiple times simultaneously */
|
|
- LOCK_ASYNC_CONTINUE(t);
|
|
|
|
|
|
+ LOCK_REPLIES(t);
|
|
|
|
|
|
- t->flags |= T_ASYNC_CONTINUE; /* we can now know anywhere in kamailio
|
|
|
|
- * that we are executing post a suspend */
|
|
|
|
-
|
|
|
|
/* which route block type were we in when we were suspended */
|
|
/* which route block type were we in when we were suspended */
|
|
cb_type = FAILURE_CB_TYPE;;
|
|
cb_type = FAILURE_CB_TYPE;;
|
|
switch (t->async_backup.backup_route) {
|
|
switch (t->async_backup.backup_route) {
|
|
@@ -219,7 +208,7 @@ int t_continue(unsigned int hash_index, unsigned int label,
|
|
/* Either t_continue() has already been
|
|
/* Either t_continue() has already been
|
|
* called or the branch has already timed out.
|
|
* called or the branch has already timed out.
|
|
* Needless to continue. */
|
|
* Needless to continue. */
|
|
- UNLOCK_ASYNC_CONTINUE(t);
|
|
|
|
|
|
+ UNLOCK_REPLIES(t);
|
|
UNREF(t); /* t_unref would kill the transaction */
|
|
UNREF(t); /* t_unref would kill the transaction */
|
|
return 1;
|
|
return 1;
|
|
}
|
|
}
|
|
@@ -389,7 +378,7 @@ int t_continue(unsigned int hash_index, unsigned int label,
|
|
}
|
|
}
|
|
|
|
|
|
done:
|
|
done:
|
|
- UNLOCK_ASYNC_CONTINUE(t);
|
|
|
|
|
|
+ UNLOCK_REPLIES(t);
|
|
|
|
|
|
if(t->async_backup.backup_route != TM_ONREPLY_ROUTE){
|
|
if(t->async_backup.backup_route != TM_ONREPLY_ROUTE){
|
|
/* unref the transaction */
|
|
/* unref the transaction */
|
|
@@ -449,10 +438,10 @@ kill_trans:
|
|
"reply generation failed\n");
|
|
"reply generation failed\n");
|
|
/* The transaction must be explicitely released,
|
|
/* The transaction must be explicitely released,
|
|
* no more timer is running */
|
|
* no more timer is running */
|
|
- UNLOCK_ASYNC_CONTINUE(t);
|
|
|
|
|
|
+ UNLOCK_REPLIES(t);
|
|
t_release_transaction(t);
|
|
t_release_transaction(t);
|
|
} else {
|
|
} else {
|
|
- UNLOCK_ASYNC_CONTINUE(t);
|
|
|
|
|
|
+ UNLOCK_REPLIES(t);
|
|
}
|
|
}
|
|
|
|
|
|
if(t->async_backup.backup_route != TM_ONREPLY_ROUTE){
|
|
if(t->async_backup.backup_route != TM_ONREPLY_ROUTE){
|