~ubuntu-branches/ubuntu/intrepid/gnunet/intrepid

« back to all changes in this revision

Viewing changes to src/applications/testing/testingtest.c

  • Committer: Bazaar Package Importer
  • Author(s): Stephan Hermann
  • Date: 2008-01-31 17:40:18 UTC
  • mfrom: (1.2.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20080131174018-sfnbb8wv7p4nmut1
Tags: 0.7.3-2ubuntu1
* Merge from debian unstable, remaining changes:
  - debian/rules:
    = Make use of code from cdbs' clean-la.mk file to clear the
      dependency_libs field in all .la files in the gnunet-dev package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
{
38
38
  pid_t daemon1;
39
39
  pid_t daemon2;
40
 
  PeerIdentity p1;
41
 
  PeerIdentity p2;
 
40
  GNUNET_PeerIdentity p1;
 
41
  GNUNET_PeerIdentity p2;
42
42
  char *c1 = NULL;
43
43
  char *c2 = NULL;
44
44
  int ret = 0;
45
45
 
46
 
  if (OK != gnunet_testing_start_daemon (12087,
47
 
                                         10000,
48
 
                                         "/tmp/gnunet-testing-1",
49
 
                                         "tcp",
50
 
                                         "advertising stats",
51
 
                                         &daemon1, &p1, &c1))
 
46
  if (GNUNET_OK != GNUNET_TESTING_start_daemon (12087,
 
47
                                                10000,
 
48
                                                "/tmp/gnunet-testing-1",
 
49
                                                "tcp",
 
50
                                                "advertising stats",
 
51
                                                &daemon1, &p1, &c1))
52
52
    ret |= 1;
53
 
  if (OK != gnunet_testing_start_daemon (22087,
54
 
                                         20000,
55
 
                                         "/tmp/gnunet-testing-2",
56
 
                                         "tcp",
57
 
                                         "advertising stats",
58
 
                                         &daemon2, &p2, &c2))
 
53
  if (GNUNET_OK != GNUNET_TESTING_start_daemon (22087,
 
54
                                                20000,
 
55
                                                "/tmp/gnunet-testing-2",
 
56
                                                "tcp",
 
57
                                                "advertising stats",
 
58
                                                &daemon2, &p2, &c2))
59
59
    ret |= 2;
60
 
  if (OK != gnunet_testing_connect_daemons (12087, 22087))
 
60
  if (GNUNET_OK != GNUNET_TESTING_connect_daemons (12087, 22087))
61
61
    ret |= 4;
62
 
  if (OK != gnunet_testing_stop_daemon (12087, daemon1))
 
62
  if (GNUNET_OK != GNUNET_TESTING_stop_daemon (12087, daemon1))
63
63
    ret |= 8;
64
 
  if (OK != gnunet_testing_stop_daemon (22087, daemon2))
 
64
  if (GNUNET_OK != GNUNET_TESTING_stop_daemon (22087, daemon2))
65
65
    ret |= 16;
66
66
  if (c1 != NULL)
67
67
    {
68
68
      UNLINK (c1);
69
 
      FREE (c1);
 
69
      GNUNET_free (c1);
70
70
    }
71
71
  if (c2 != NULL)
72
72
    {
73
73
      UNLINK (c2);
74
 
      FREE (c2);
 
74
      GNUNET_free (c2);
75
75
    }
76
76
  return ret;
77
77
}