@register('<STR_LIT>')<EOL>def ping(daemon, channel, data=None):
if not channel:<EOL><INDENT>return<EOL><DEDENT>node_name = daemon.config['<STR_LIT>'].get('<STR_LIT>')<EOL>reply = ['<STR_LIT>']<EOL>if node_name or data:<EOL><INDENT>reply.append(node_name or '<STR_LIT>')<EOL><DEDENT>if data:<EOL><INDENT>reply.append(data)<EOL><DEDENT>with utils.ignore_except():<EOL><INDENT>daemon.db.publish(channel, '<STR_LIT::>'.join(reply))<EOL><DEDENT>
Process the 'ping' control message.

:param daemon: The control daemon; used to get at the
               configuration and the database.
:param channel: The publish channel to which to send the
                response.
:param data: Optional extra data.  Will be returned as the
             second argument of the response.

Responds to the named channel with a command of 'pong' and
with the node_name (if configured) and provided data as
arguments.