#undef ex
return "Invalid error number";
}
+
+/**
+ * Return server id of the requesting application.
+ *
+ * This function should be only called from within interface
+ * implementation,
+ *
+ * @param[in] obj Object being requested
+ * @param[out] req_source Server ID of the requesting application
+ */
+void
+forb_get_req_source(const forb_object obj, forb_server_id *req_source)
+{
+ if (req_source) {
+ if (obj && obj->exec_req) {
+ *req_source = obj->exec_req->source;
+ } else {
+ memset(req_source, 0, sizeof(*req_source));
+ }
+ }
+}