diff options
Diffstat (limited to 'src/transport/transport-testing.c')
-rw-r--r-- | src/transport/transport-testing.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/transport/transport-testing.c b/src/transport/transport-testing.c index f1c06ebc0..0c51ef334 100644 --- a/src/transport/transport-testing.c +++ b/src/transport/transport-testing.c | |||
@@ -71,19 +71,15 @@ notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
71 | const struct GNUNET_ATS_Information *ats, uint32_t ats_count) | 71 | const struct GNUNET_ATS_Information *ats, uint32_t ats_count) |
72 | { | 72 | { |
73 | struct PeerContext *p = cls; | 73 | struct PeerContext *p = cls; |
74 | char *p2_s; | ||
75 | struct PeerContext *p2; | ||
74 | 76 | ||
75 | /* Find PeerContext */ | 77 | GNUNET_assert (NULL != p); |
76 | GNUNET_assert (p != 0); | 78 | GNUNET_assert (NULL != p->tth); |
77 | GNUNET_assert (p->tth != NULL); | 79 | p2 = find_peer_context (p->tth, peer); |
78 | struct PeerContext *p2 = find_peer_context (p->tth, peer); | ||
79 | |||
80 | if (p == NULL) | ||
81 | return; | ||
82 | if (p->nc != NULL) | 80 | if (p->nc != NULL) |
83 | p->nc (p->cb_cls, peer, ats, ats_count); | 81 | p->nc (p->cb_cls, peer, ats, ats_count); |
84 | 82 | ||
85 | char *p2_s; | ||
86 | |||
87 | if (p2 != NULL) | 83 | if (p2 != NULL) |
88 | GNUNET_asprintf (&p2_s, "%u (`%s')", p2->no, GNUNET_i2s (&p2->id)); | 84 | GNUNET_asprintf (&p2_s, "%u (`%s')", p2->no, GNUNET_i2s (&p2->id)); |
89 | else | 85 | else |
@@ -788,5 +784,4 @@ fail: | |||
788 | } | 784 | } |
789 | 785 | ||
790 | 786 | ||
791 | |||
792 | /* end of transport-testing.c */ | 787 | /* end of transport-testing.c */ |