Browse code

- $? / $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 authored on 06/12/2006 15:59:15
Showing 2 changed files
... ...
@@ -67,7 +67,7 @@ MAIN_NAME=ser
67 67
 VERSION = 0
68 68
 PATCHLEVEL = 10
69 69
 SUBLEVEL =   99
70
-EXTRAVERSION = -dev62
70
+EXTRAVERSION = -dev63
71 71
 
72 72
 SER_VER = $(shell expr $(VERSION) \* 1000000 + $(PATCHLEVEL) \* 1000 + \
73 73
 			$(SUBLEVEL) )
... ...
@@ -42,6 +42,8 @@
42 42
  *  2005-12-19  select framework (mma)
43 43
  *  2006-04-12  updated *_send() calls to use a struct dest_info (andrei)
44 44
  *  2006-07-27  dns cache and dns based send address failover support (andrei)
45
+ *  2006-12-06  on popular request last_retcode set also by module functions
46
+ *              (andrei)
45 47
  */
46 48
 
47 49
 
... ...
@@ -681,6 +683,7 @@ int do_action(struct action* a, struct sip_msg* msg)
681 683
 					(char*)a->val[3].u.data
682 684
 				);
683 685
 				if (ret==0) run_flags|=EXIT_R_F;
686
+				last_retcode=ret;
684 687
 			} else {
685 688
 				LOG(L_CRIT,"BUG: do_action: bad module call\n");
686 689
 			}