unlang_group_t *g = unlang_generic_to_group(frame->instruction);
unlang_call_t *gext = unlang_group_to_call(g);
fr_pair_t *packet_type_vp = NULL;
+ unlang_frame_state_call_t *state = frame->state;
switch (pair_update_reply(&packet_type_vp, gext->attr_packet_type)) {
case 0:
break; /* Don't change */
default:
+ request->module = state->module;
RETURN_UNLANG_FAIL;
}
+ request->module = state->module;
+
return UNLANG_ACTION_CALCULATE_RESULT;
}
char const *name;
fr_dict_t const *dict;
fr_dict_attr_t const *attr_packet_type;
+ unlang_stack_frame_t *frame;
+ unlang_frame_state_call_t *state;
/*
* Temporary hack until packet->code is removed
return UNLANG_ACTION_FAIL;
}
+ frame = &stack->frame[stack->depth];
+ state = frame->state;
+ state->module = request->module;
+ request->module = NULL;
+
return UNLANG_ACTION_PUSHED_CHILD;
}
.unlang_size = sizeof(unlang_call_t),
.unlang_name = "unlang_call_t",
+
+ .frame_state_size = sizeof(unlang_frame_state_call_t),
+ .frame_state_type = "unlang_frame_state_call_t",
});
}
///< sections run in the server_cs.
} unlang_call_t;
+/** A module stack entry
+ *
+ * Represents a single module call on the unlang stack.
+ */
+typedef struct {
+ char const *module; //!< module name from request->module
+} unlang_frame_state_call_t;
+
+
/** Cast a group structure to the call keyword extension
*
*/