gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r2252 - GNUnet/src/applications/chat


From: grothoff
Subject: [GNUnet-SVN] r2252 - GNUnet/src/applications/chat
Date: Mon, 14 Nov 2005 02:22:46 -0800 (PST)

Author: grothoff
Date: 2005-11-14 02:22:45 -0800 (Mon, 14 Nov 2005)
New Revision: 2252

Modified:
   GNUnet/src/applications/chat/chat.c
Log:
fixing bug 951

Modified: GNUnet/src/applications/chat/chat.c
===================================================================
--- GNUnet/src/applications/chat/chat.c 2005-11-14 10:16:53 UTC (rev 2251)
+++ GNUnet/src/applications/chat/chat.c 2005-11-14 10:22:45 UTC (rev 2252)
@@ -103,10 +103,11 @@
     /* we have not seen it before, send to all TCP clients
        and broadcast to all peers */
     markSeen(&hc);
+    broadcastToConnected(message, 5, 1);
+    cmsg->header.type = htons(CS_PROTO_chat_MSG);
     for (j=0;j<clientCount;j++)
       coreAPI->sendToClient(clients[j],
                    &cmsg->header);
-    broadcastToConnected(message, 5, 1);
     pmsg->nick[CHAT_NICK_LENGTH-1] = '\0';
     pmsg->message[CHAT_MSG_LENGTH-1] = '\0';
     /*
@@ -161,6 +162,7 @@
     }
   }
   /* forward to all other nodes in the network */
+  pmsg->header.type = htons(P2P_PROTO_chat_MSG);
   broadcastToConnected(&pmsg->header, 5, 1);
   MUTEX_UNLOCK(&chatMutex);
 }
@@ -186,7 +188,6 @@
 int initialize_module_chat(CoreAPIForApplication * capi) {
   int ok = OK;
 
-  GNUNET_ASSERT(P2P_PROTO_chat_MSG == CS_PROTO_chat_MSG);
   GNUNET_ASSERT(sizeof(P2P_chat_MESSAGE) == sizeof(CS_chat_MESSAGE));
   MUTEX_CREATE(&chatMutex);
   clientCount = 0;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]