Skip to content

Commit

Permalink
Rename app:configure to app:link.
Browse files Browse the repository at this point in the history
  • Loading branch information
eugeneia committed Jun 20, 2016
1 parent 7d5b973 commit e60226c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@ the engine for use in processing and are *read-only*.
Name of the app. *Read-only*.


— Method **myapp:configure**
— Method **myapp:link**

*Optional*. Configure the app. At this the `input` and `output` link tables are
populated, and `appname` is set. The app can perform additional initialization
if required.
*Optional*. Called any time the app’s links may have been changed (including on
start-up). Guaranteed to be called before `pull` and `push` are called with new
links.


— Method **myapp:pull**
Expand Down
2 changes: 1 addition & 1 deletion src/apps/bridge/base.lua
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ end
-- accessible via the keys l_in and l_out, respectively. This helps
-- to speed up packet forwarding by eliminating a lookup in the input
-- and output tables.
function bridge:configure ()
function bridge:link ()
assert(self.input and self.output)
for _, port in ipairs(self._ports) do
port.l_in = self.input[port.name]
Expand Down
4 changes: 2 additions & 2 deletions src/core/app.lua
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,9 @@ function apply_config_actions (actions, conf)
-- Commit changes.
app_table, link_table = new_app_table, new_link_table
app_array, link_array = new_app_array, new_link_array
-- Trigger configure event for each app.
-- Trigger link event for each app.
for _, app in ipairs(app_array) do
if app.configure then app:configure() end
if app.link then app:link() end
end
end

Expand Down

0 comments on commit e60226c

Please sign in to comment.