[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r1533 - in GNUnet/src/applications: pingpong session
From: |
grothoff |
Subject: |
[GNUnet-SVN] r1533 - in GNUnet/src/applications: pingpong session |
Date: |
Thu, 14 Jul 2005 13:20:57 -0700 (PDT) |
Author: grothoff
Date: 2005-07-14 13:20:52 -0700 (Thu, 14 Jul 2005)
New Revision: 1533
Modified:
GNUnet/src/applications/pingpong/pingpong.c
GNUnet/src/applications/session/connect.c
Log:
fix
Modified: GNUnet/src/applications/pingpong/pingpong.c
===================================================================
--- GNUnet/src/applications/pingpong/pingpong.c 2005-07-14 20:00:32 UTC (rev
1532)
+++ GNUnet/src/applications/pingpong/pingpong.c 2005-07-14 20:20:52 UTC (rev
1533)
@@ -182,12 +182,12 @@
pmsg->header.type = htons(p2p_PROTO_PONG);
/* allow using a different transport for sending the reply, the
transport may have been uni-directional! */
- if (OK != coreAPI->sendPlaintext(tsession,
- (char*) pmsg,
- sizeof(PINGPONG_Message))) {
- return sendPlaintext(sender, pmsg);
- }
- return OK;
+ if ( (tsession != NULL) &&
+ (OK == coreAPI->sendPlaintext(tsession,
+ (char*) pmsg,
+ sizeof(PINGPONG_Message))) )
+ return OK;
+ return sendPlaintext(sender, pmsg);
}
/**
Modified: GNUnet/src/applications/session/connect.c
===================================================================
--- GNUnet/src/applications/session/connect.c 2005-07-14 20:00:32 UTC (rev
1532)
+++ GNUnet/src/applications/session/connect.c 2005-07-14 20:20:52 UTC (rev
1533)
@@ -479,6 +479,11 @@
if ( (topology != NULL) &&
(topology->allowConnectionFrom(sender) == SYSERR) )
return SYSERR;
+ if (equalsHashCode512(&sender->hashPubKey,
+ &coreAPI->myIdentity->hashPubKey)) {
+ BREAK();
+ return SYSERR;
+ }
hash2enc(&sender->hashPubKey,
&enc);
#if DEBUG_SESSION
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r1533 - in GNUnet/src/applications: pingpong session,
grothoff <=