فهرست منبع

- $? / $retcode it's changed now also by the last module function call
(previously it was modified only by route() calls -- it was the last
returned value from a route)

Andrei Pelinescu-Onciul 19 سال پیش
والد
کامیت
1875e1d720
2فایلهای تغییر یافته به همراه4 افزوده شده و 1 حذف شده
  1. 1 1
      Makefile.defs
  2. 3 0
      action.c

+ 1 - 1
Makefile.defs

@@ -67,7 +67,7 @@ MAIN_NAME=ser
 VERSION = 0
 PATCHLEVEL = 10
 SUBLEVEL =   99
-EXTRAVERSION = -dev62
+EXTRAVERSION = -dev63
 
 SER_VER = $(shell expr $(VERSION) \* 1000000 + $(PATCHLEVEL) \* 1000 + \
 			$(SUBLEVEL) )

+ 3 - 0
action.c

@@ -42,6 +42,8 @@
  *  2005-12-19  select framework (mma)
  *  2006-04-12  updated *_send() calls to use a struct dest_info (andrei)
  *  2006-07-27  dns cache and dns based send address failover support (andrei)
+ *  2006-12-06  on popular request last_retcode set also by module functions
+ *              (andrei)
  */
 
 
@@ -681,6 +683,7 @@ int do_action(struct action* a, struct sip_msg* msg)
 					(char*)a->val[3].u.data
 				);
 				if (ret==0) run_flags|=EXIT_R_F;
+				last_retcode=ret;
 			} else {
 				LOG(L_CRIT,"BUG: do_action: bad module call\n");
 			}