Browse Source

fixups: call them even for 0 params. functions

- kamailio compatibility: fixups for function with no parameters
 can be used
Andrei Pelinescu-Onciul 17 năm trước cách đây
mục cha
commit
e692101f92
1 tập tin đã thay đổi với 5 bổ sung0 xóa
  1. 5 0
      route.c

+ 5 - 0
route.c

@@ -512,6 +512,11 @@ static int fix_actions(struct action* a)
 				if (cmd && cmd->c.fixup) {
 					int i;
 					DBG("fixing %s()\n", cmd->c.name);
+					if (t->val[1].u.number==0) {
+						ret = cmd->c.fixup(0, 0);
+						if (ret < 0)
+							return ret;
+					}
 					/* type cast NUMBER to STRING, old modules may expect
 					 * all STRING params during fixup */
 					for (i=0; i<t->val[1].u.number; i++) {