~ubuntu-branches/ubuntu/jaunty/xorp/jaunty

« back to all changes in this revision

Viewing changes to xrl/targets/test_peer_base.cc

  • Committer: Bazaar Package Importer
  • Author(s): Jose Calhariz, Javier Fernandez-Sanguino, Jose Calhariz
  • Date: 2008-01-23 01:24:37 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080123012437-7l2u9r0k8e7op8st
Tags: 1.5~cvs.20080128-1
[ Javier Fernandez-Sanguino ]
* Update to latest CVS contents
* Modify debian/rules to prevent autobuilders from building 
  the binary-independent components: (Closes: #441121)
  - Create a new Build-Depends-Indep with all the TeX
  components used to build documentation
  - Since autobuilders call build, which in turns calls build-indep, hack
    the debian rules file so that the documentation is only built if ps2pdf,
    dvips and pslatex are available. 
* Modify the init.d script:
  - restart action: Do not attempt to stop xorp if not running
  - stop function: fix errors in the script
  - add a try-restart action
  - restructure the init.d script, move the restart code to a function
  - review the use of echo calls and exit values
* Use, as examples, the new boot files at rtrmgr/config/

[ Jose Calhariz ]
* Add depends on ncurses-dev, I don't know why xorp use tigetstr
  function from curses.  This way the depends field change less between
  build environments.
* Removed pushd and popd commands from Makefile and replaced with cd
  commands, was a bashism and FTBFS (closes: #453637)
* debian/control converted to utf-8 (closes: #454026) (closes: #453485)
* init.d/xorp now returns 0 if disabled.
* Added Vcs-Browser and Vcs-Svn fields pointing to the repository of the
  package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (c) 2001-2007 International Computer Science Institute
 
2
 * Copyright (c) 2001-2008 International Computer Science Institute
3
3
 * See LICENSE file for licensing, conditions, and warranties on use.
4
4
 *
5
5
 * DO NOT EDIT THIS FILE - IT IS PROGRAMMATICALLY GENERATED
7
7
 * Generated by 'tgt-gen'.
8
8
 */
9
9
 
10
 
#ident "$XORP: xorp/xrl/targets/test_peer_base.cc,v 1.21 2007/07/12 21:46:14 pavlin Exp $"
 
10
#ident "$XORP: xorp/xrl/targets/test_peer_base.cc,v 1.23 2008/01/04 03:18:16 pavlin Exp $"
11
11
 
12
12
 
13
13
#include "test_peer_base.hh"
235
235
}
236
236
 
237
237
const XrlCmdError
 
238
XrlTestPeerTargetBase::handle_test_peer_0_1_use_4byte_asnums(const XrlArgs& xa_inputs, XrlArgs* /* pxa_outputs */)
 
239
{
 
240
    if (xa_inputs.size() != 1) {
 
241
        XLOG_ERROR("Wrong number of arguments (%u != %u) handling %s",
 
242
            XORP_UINT_CAST(1), XORP_UINT_CAST(xa_inputs.size()), "test_peer/0.1/use_4byte_asnums");
 
243
        return XrlCmdError::BAD_ARGS();
 
244
    }
 
245
 
 
246
    /* Return value declarations */
 
247
    try {
 
248
        XrlCmdError e = test_peer_0_1_use_4byte_asnums(
 
249
            xa_inputs.get_bool("use"));
 
250
        if (e != XrlCmdError::OKAY()) {
 
251
            XLOG_WARNING("Handling method for %s failed: %s",
 
252
                         "test_peer/0.1/use_4byte_asnums", e.str().c_str());
 
253
            return e;
 
254
        }
 
255
    } catch (const XrlArgs::BadArgs& e) {
 
256
        XLOG_ERROR("Error decoding the arguments: %s", e.str().c_str());
 
257
        return XrlCmdError::BAD_ARGS(e.str());
 
258
    }
 
259
    return XrlCmdError::OKAY();
 
260
}
 
261
 
 
262
const XrlCmdError
238
263
XrlTestPeerTargetBase::handle_test_peer_0_1_connect(const XrlArgs& xa_inputs, XrlArgs* /* pxa_outputs */)
239
264
{
240
265
    if (xa_inputs.size() != 2) {
436
461
            callback(this, &XrlTestPeerTargetBase::handle_test_peer_0_1_packetisation)) == false) {
437
462
            XLOG_ERROR("Failed to xrl handler finder://%s/%s", "test_peer", "test_peer/0.1/packetisation");
438
463
        }
 
464
        if (_cmds->add_handler("test_peer/0.1/use_4byte_asnums",
 
465
            callback(this, &XrlTestPeerTargetBase::handle_test_peer_0_1_use_4byte_asnums)) == false) {
 
466
            XLOG_ERROR("Failed to xrl handler finder://%s/%s", "test_peer", "test_peer/0.1/use_4byte_asnums");
 
467
        }
439
468
        if (_cmds->add_handler("test_peer/0.1/connect",
440
469
            callback(this, &XrlTestPeerTargetBase::handle_test_peer_0_1_connect)) == false) {
441
470
            XLOG_ERROR("Failed to xrl handler finder://%s/%s", "test_peer", "test_peer/0.1/connect");
476
505
        _cmds->remove_handler("common/0.1/shutdown");
477
506
        _cmds->remove_handler("test_peer/0.1/register");
478
507
        _cmds->remove_handler("test_peer/0.1/packetisation");
 
508
        _cmds->remove_handler("test_peer/0.1/use_4byte_asnums");
479
509
        _cmds->remove_handler("test_peer/0.1/connect");
480
510
        _cmds->remove_handler("test_peer/0.1/listen");
481
511
        _cmds->remove_handler("test_peer/0.1/bind");