View Issue Details

IDProjectCategoryView StatusLast Update
0001665GNUnetotherpublic2011-04-27 16:18
ReportervminkoAssigned ToChristian Grothoff 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0001665: Update for the chat app
DescriptionChanges:

1. Fixed problem described here: https://gnunet.org/node/1237. GNUNET_CORE_iterate_peers is no longer used in chat.
2. Two functions are renamed in order to conform the coding style.
3. Tabs are replaced with spaces (this goes in a separate patch in order to make the other changes clear).

gnunet-svn@14557-chat-update.patch should be applied before gnunet-svn@14557-chat-indentation-fix.patch.
TagsNo tags attached.

Activities

2011-03-03 05:13

 

gnunet-svn@14557-chat-update.patch (16,448 bytes)
Index: src/chat/chat.c
===================================================================
--- src/chat/chat.c	(revision 14557)
+++ src/chat/chat.c	(working copy)
@@ -149,7 +149,7 @@
  * Ask client to send a join request.
  */
 static int
-GNUNET_CHAT_rejoin_room (struct GNUNET_CHAT_Room *chat_room);
+rejoin_room (struct GNUNET_CHAT_Room *chat_room);
 
 
 /**
@@ -448,7 +448,7 @@
   if (NULL == msg)
     {
       GNUNET_break (0);
-      GNUNET_CHAT_rejoin_room (chat_room);
+      rejoin_room (chat_room);
       return;
     }
   process_result (chat_room, msg);
@@ -468,8 +468,8 @@
  * Returns the private key on success, NULL on error.
  */
 static struct GNUNET_CRYPTO_RsaPrivateKey *
-GNUNET_CHAT_initPrivateKey (const struct GNUNET_CONFIGURATION_Handle *cfg,
-			    const char *nick_name)
+init_private_key (const struct GNUNET_CONFIGURATION_Handle *cfg,
+		  const char *nick_name)
 {
   char *home;
   char *keyfile;
@@ -548,7 +548,7 @@
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
 		  "Could not transmit join request, retrying...\n");
 #endif
-      GNUNET_CHAT_rejoin_room (chat_room);
+      rejoin_room (chat_room);
       return 0;
     }
 #if DEBUG_CHAT
@@ -591,7 +591,7 @@
  * Ask to send a join request.
  */
 static int
-GNUNET_CHAT_rejoin_room (struct GNUNET_CHAT_Room *chat_room)
+rejoin_room (struct GNUNET_CHAT_Room *chat_room)
 {
   size_t size_of_join;
 
@@ -682,7 +682,7 @@
 #if DEBUG_CHAT
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Joining the room '%s'\n", room_name);
 #endif
-  priv_key = GNUNET_CHAT_initPrivateKey (cfg, nick_name);
+  priv_key = init_private_key (cfg, nick_name);
   if (NULL == priv_key)
     return NULL;
   GNUNET_CRYPTO_rsa_key_get_public (priv_key, &pub_key);
@@ -732,7 +732,7 @@
   chat_room->cfg = cfg;
   chat_room->client = client;
   chat_room->members = NULL;
-  if (GNUNET_SYSERR == GNUNET_CHAT_rejoin_room (chat_room))
+  if (GNUNET_SYSERR == rejoin_room (chat_room))
     {
       GNUNET_CHAT_leave_room (chat_room);
       return NULL;
Index: src/chat/gnunet-service-chat.c
===================================================================
--- src/chat/gnunet-service-chat.c	(revision 14557)
+++ src/chat/gnunet-service-chat.c	(working copy)
@@ -35,6 +35,7 @@
 
 #define DEBUG_CHAT_SERVICE GNUNET_NO
 #define MAX_TRANSMIT_DELAY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 60)
+#define EXPECTED_NEIGHBOUR_COUNT 16
 #define QUEUE_SIZE 16
 #define MAX_ANONYMOUS_MSG_LIST_LENGTH 16
 
@@ -95,6 +96,19 @@
 };
 
 /**
+ * Information about a peer that we are connected to.
+ * We track data that is useful for determining which
+ * peers should receive our requests.
+ */
+struct ConnectedPeer
+{
+  /**
+   * The peer's identity.
+   */
+  GNUNET_PEER_Id pid;  
+};
+
+/**
  * Linked list of recent anonymous messages.
  */
 struct AnonymousMessage
@@ -138,6 +152,11 @@
  * Head of the list of recent anonymous messages.
  */
 static struct AnonymousMessage *anonymous_list_head = NULL;
+
+/**
+ * Map of peer identifiers to "struct ConnectedPeer" (for that peer).
+ */
+static struct GNUNET_CONTAINER_MultiHashMap *connected_peers;
  
 
 static void
@@ -226,33 +245,32 @@
 /**
  * Ask to send a message notification to the peer.
  */
-static void
+static int
 send_message_noficiation (void *cls,
-			  const struct GNUNET_PeerIdentity *peer,
-			  const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+			  const GNUNET_HashCode *key,
+			  void *value)
 {
   struct P2PReceiveNotificationMessage *msg = cls;
+  struct ConnectedPeer *cp = value;
+  struct GNUNET_PeerIdentity pid;
   struct P2PReceiveNotificationMessage *my_msg;
-  struct GNUNET_CORE_TransmitHandle *th;
 
-  if (NULL == peer)
-    GNUNET_free (msg);
-  else
-    {
+  GNUNET_PEER_resolve (cp->pid, &pid);
 #if DEBUG_CHAT_SERVICE
-      GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-		  "Sending message notification to `%s'\n", GNUNET_i2s (peer));
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+	      "Sending message notification to `%s'\n", GNUNET_i2s (&pid));
 #endif
-      my_msg = GNUNET_memdup (msg, ntohs (msg->header.size));
-      th = GNUNET_CORE_notify_transmit_ready (core,
-					      1,
-					      MAX_TRANSMIT_DELAY,
-					      peer,
-					      ntohs (msg->header.size),
-					      &transmit_message_notification_to_peer,
-					      my_msg);
-      GNUNET_assert (NULL != th);
-    }
+  my_msg = GNUNET_memdup (msg, ntohs (msg->header.size));
+  if (NULL == GNUNET_CORE_notify_transmit_ready (core,
+						 1,
+						 MAX_TRANSMIT_DELAY,
+						 &pid,
+						 ntohs (msg->header.size),
+						 &transmit_message_notification_to_peer,
+						 my_msg))
+    GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+		_("Failed to queue a message notification\n"));
+  return GNUNET_YES;
 }
 
 
@@ -460,9 +478,10 @@
   p2p_rnmsg->target = trmsg->target;
   if (is_anon)
     remember_anonymous_message (p2p_rnmsg);
-  GNUNET_CORE_iterate_peers (cfg,
-			     &send_message_noficiation,
-			     p2p_rnmsg);
+  GNUNET_CONTAINER_multihashmap_iterate (connected_peers,
+					 &send_message_noficiation,
+					 p2p_rnmsg);
+  GNUNET_free (p2p_rnmsg);
   GNUNET_SERVER_receive_done (client, GNUNET_OK);
   GNUNET_free (rnmsg);
 }
@@ -515,33 +534,34 @@
 /**
  * Ask to send a join notification to the peer.
  */
-static void
+static int
 send_join_noficiation (void *cls,
-		       const struct GNUNET_PeerIdentity *peer,
-		       const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+		       const GNUNET_HashCode *key,
+		       void *value)
 {
   struct ChatClient *entry = cls;
-  struct GNUNET_CORE_TransmitHandle *th;
+  struct ConnectedPeer *cp = value;
+  struct GNUNET_PeerIdentity pid;
   size_t msg_size;
 
-  if (NULL != peer)
-    {
+  GNUNET_PEER_resolve (cp->pid, &pid);
 #if DEBUG_CHAT_SERVICE
-      GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-		  "Sending join notification to `%s'\n", GNUNET_i2s (peer));
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+	      "Sending join notification to `%s'\n", GNUNET_i2s (&pid));
 #endif
-      msg_size = sizeof (struct P2PJoinNotificationMessage) +
-	strlen (entry->room) + 
-	entry->meta_len;
-      th = GNUNET_CORE_notify_transmit_ready (core,
-					      1,
-					      MAX_TRANSMIT_DELAY,
-					      peer,
-					      msg_size,
-					      &transmit_join_notification_to_peer,
-					      entry);
-      GNUNET_assert (NULL != th);
-    }
+  msg_size = sizeof (struct P2PJoinNotificationMessage) +
+    strlen (entry->room) + 
+    entry->meta_len;
+  if (NULL == GNUNET_CORE_notify_transmit_ready (core,
+						 1,
+						 MAX_TRANSMIT_DELAY,
+						 &pid,
+						 msg_size,
+						 &transmit_join_notification_to_peer,
+						 entry))
+    GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+		_("Failed to queue a join notification\n"));
+  return GNUNET_YES;
 }
 
 
@@ -662,9 +682,9 @@
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
 	      "Broadcasting join notification to neighbour peers\n");
 #endif
-  GNUNET_CORE_iterate_peers (cfg,
-			     &send_join_noficiation,
-			     new_entry);
+  GNUNET_CONTAINER_multihashmap_iterate (connected_peers,
+					 &send_join_noficiation,
+					 new_entry);
   GNUNET_SERVER_receive_done (client, GNUNET_OK);
   GNUNET_free (jnmsg);
 }
@@ -710,36 +730,35 @@
 /**
  * Ask to send a confirmation receipt to the peer.
  */
-static void
+static int
 send_confirmation_receipt (void *cls,
-			   const struct GNUNET_PeerIdentity *peer,
-			   const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+			   const GNUNET_HashCode *key,
+			   void *value)
 {
   struct P2PConfirmationReceiptMessage *receipt = cls;
+  struct ConnectedPeer *cp = value;
+  struct GNUNET_PeerIdentity pid;
   struct P2PConfirmationReceiptMessage *my_receipt;
-  struct GNUNET_CORE_TransmitHandle *th;
   size_t msg_size;
 
-  if (NULL == peer)
-    GNUNET_free (receipt);
-  else
-    {
+  GNUNET_PEER_resolve (cp->pid, &pid);
 #if DEBUG_CHAT_SERVICE
-      GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-		  "Sending confirmation receipt to `%s'\n", GNUNET_i2s (peer));
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+	      "Sending confirmation receipt to `%s'\n", GNUNET_i2s (&pid));
 #endif
-      msg_size = sizeof (struct P2PConfirmationReceiptMessage);
-      my_receipt = GNUNET_memdup (receipt,
-				  sizeof (struct P2PConfirmationReceiptMessage));
-      th = GNUNET_CORE_notify_transmit_ready (core,
-					      1,
-					      MAX_TRANSMIT_DELAY,
-					      peer,
-					      msg_size,
-					      &transmit_confirmation_receipt_to_peer,
-					      my_receipt);
-      GNUNET_assert (NULL != th);
-    }
+  msg_size = sizeof (struct P2PConfirmationReceiptMessage);
+  my_receipt = GNUNET_memdup (receipt,
+			      sizeof (struct P2PConfirmationReceiptMessage));
+  if (NULL == GNUNET_CORE_notify_transmit_ready (core,
+						 1,
+						 MAX_TRANSMIT_DELAY,
+						 &pid,
+						 msg_size,
+						 &transmit_confirmation_receipt_to_peer,
+						 my_receipt))
+    GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+		_("Failed to queue a confirmation receipt\n"));
+  return GNUNET_YES;
 }
 
 
@@ -812,9 +831,10 @@
       p2p_crmsg->author = receipt->author;
       p2p_crmsg->content = receipt->content;
       p2p_crmsg->sequence_number = htonl (target->rcpt_sequence_number);
-      GNUNET_CORE_iterate_peers (cfg,
-				 &send_confirmation_receipt,
-				 p2p_crmsg);
+      GNUNET_CONTAINER_multihashmap_iterate (connected_peers,
+					     &send_confirmation_receipt,
+					     p2p_crmsg);
+      GNUNET_free (p2p_crmsg);
     }
   else
     {
@@ -896,40 +916,35 @@
 /**
  * Ask to send a leave notification to the peer.
  */
-static void
+static int
 send_leave_noficiation (void *cls,
-			const struct GNUNET_PeerIdentity *peer,
-			const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+			const GNUNET_HashCode *key,
+			void *value) 
 {
   struct ChatClient *entry = cls;
+  struct ConnectedPeer *cp = value;
+  struct GNUNET_PeerIdentity pid;
   struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *public_key;
   size_t msg_size;
 
-  if (NULL == peer)
-    {
-      GNUNET_free (entry->room);
-      GNUNET_free_non_null (entry->member_info);
-      GNUNET_free (entry);
-    }
-  else
-    {
+  GNUNET_PEER_resolve (cp->pid, &pid);
 #if DEBUG_CHAT_SERVICE
-      GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-		  "Sending leave notification to `%s'\n", GNUNET_i2s (peer));
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+	      "Sending leave notification to `%s'\n", GNUNET_i2s (&pid));
 #endif
-      msg_size = sizeof (struct P2PLeaveNotificationMessage);
-      public_key = GNUNET_memdup (&entry->public_key,
-				  sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded));
-      if (NULL == GNUNET_CORE_notify_transmit_ready (core,
-					      1,
-					      MAX_TRANSMIT_DELAY,
-					      peer,
-					      msg_size,
-					      &transmit_leave_notification_to_peer,
-						     public_key))
-	GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
-		    _("Failed to queue a leave notification\n"));
-    }
+  msg_size = sizeof (struct P2PLeaveNotificationMessage);
+  public_key = GNUNET_memdup (&entry->public_key,
+			      sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded));
+  if (NULL == GNUNET_CORE_notify_transmit_ready (core,
+						 1,
+						 MAX_TRANSMIT_DELAY,
+						 &pid,
+						 msg_size,
+						 &transmit_leave_notification_to_peer,
+						 public_key))
+    GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+		_("Failed to queue a leave notification\n"));
+  return GNUNET_YES;
 }
 
 
@@ -994,9 +1009,12 @@
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
 	      "Broadcasting leave notification to neighbour peers\n");
 #endif
-  GNUNET_CORE_iterate_peers (cfg,
-			     &send_leave_noficiation,
-			     pos);
+  GNUNET_CONTAINER_multihashmap_iterate (connected_peers,
+					 &send_leave_noficiation,
+					 pos);
+  GNUNET_free (pos->room);
+  GNUNET_free_non_null (pos->member_info);
+  GNUNET_free (pos);
 }
 
 
@@ -1112,9 +1130,9 @@
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
 	      "Broadcasting join notification to neighbour peers\n");
 #endif
-  GNUNET_CORE_iterate_peers (cfg,
-			     &send_join_noficiation,
-			     new_entry);
+  GNUNET_CONTAINER_multihashmap_iterate (connected_peers,
+					 &send_join_noficiation,
+					 new_entry);
   GNUNET_free (jnmsg);
   return GNUNET_OK;
 }
@@ -1194,9 +1212,12 @@
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
 	      "Broadcasting leave notification to neighbour peers\n");
 #endif
-  GNUNET_CORE_iterate_peers (cfg,
-			     &send_leave_noficiation,
-			     pos);
+  GNUNET_CONTAINER_multihashmap_iterate (connected_peers,
+					 &send_leave_noficiation,
+					 pos);
+  GNUNET_free (pos->room);
+  GNUNET_free_non_null (pos->member_info);
+  GNUNET_free (pos);
   return GNUNET_OK;
 }
 
@@ -1347,9 +1368,9 @@
 	      "Broadcasting message notification to neighbour peers\n");
 #endif
   my_p2p_rnmsg = GNUNET_memdup (p2p_rnmsg, ntohs (p2p_rnmsg->header.size));
-  GNUNET_CORE_iterate_peers (cfg,
-			     &send_message_noficiation,
-			     my_p2p_rnmsg);
+  GNUNET_CONTAINER_multihashmap_iterate (connected_peers,
+					 &send_message_noficiation,
+					 my_p2p_rnmsg);
   GNUNET_free (rnmsg);
   return GNUNET_OK;
 }
@@ -1470,9 +1491,10 @@
 		  " Broadcasting receipt to neighbour peers\n");
 #endif
       my_p2p_crmsg = GNUNET_memdup (p2p_crmsg, sizeof (struct P2PConfirmationReceiptMessage));
-      GNUNET_CORE_iterate_peers (cfg,
-				 &send_confirmation_receipt,
-				 my_p2p_crmsg);
+      GNUNET_CONTAINER_multihashmap_iterate (connected_peers,
+					     &send_confirmation_receipt,
+					     my_p2p_crmsg);
+      GNUNET_free (my_p2p_crmsg);
     }
   else
     {
@@ -1559,12 +1581,13 @@
 		      const struct GNUNET_PeerIdentity *peer,
 		      const struct GNUNET_TRANSPORT_ATS_Information *atsi)
 {
+  struct ConnectedPeer *cp;
   struct GNUNET_CORE_TransmitHandle *th;
 
+  if (0 == memcmp (peer, me, sizeof (struct GNUNET_PeerIdentity)))
+    return;
   GNUNET_log (GNUNET_ERROR_TYPE_INFO,
 	      "Peer connected: %s\n", GNUNET_i2s (peer));
-  if (0 == memcmp (peer, me, sizeof (struct GNUNET_PeerIdentity)))
-    return;
   th = GNUNET_CORE_notify_transmit_ready (core,
 					  1,
 					  MAX_TRANSMIT_DELAY,
@@ -1573,10 +1596,54 @@
 					  &transmit_sync_request_to_peer,
 					  NULL);
   GNUNET_assert (NULL != th);
+  cp = GNUNET_CONTAINER_multihashmap_get (connected_peers,
+					  &peer->hashPubKey);
+  if (NULL != cp)
+    {
+      GNUNET_break (0);
+      return;
+    }
+  cp = GNUNET_malloc (sizeof (struct ConnectedPeer));
+  cp->pid = GNUNET_PEER_intern (peer);
+  GNUNET_break (GNUNET_OK ==
+		GNUNET_CONTAINER_multihashmap_put (connected_peers,
+						   &peer->hashPubKey,
+						   cp,
+						   GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY));
 }
 
 
 /**
+ * Iterator to free peer entries.
+ *
+ * @param cls closure, unused
+ * @param key current key code
+ * @param value value in the hash map (peer entry)
+ * @return GNUNET_YES (we should continue to iterate)
+ */
+static int 
+clean_peer (void *cls,
+	    const GNUNET_HashCode * key,
+	    void *value)
+{
+  struct ConnectedPeer *cp;
+  const struct GNUNET_PeerIdentity *peer = (const struct GNUNET_PeerIdentity *) key;
+
+  cp = GNUNET_CONTAINER_multihashmap_get (connected_peers,
+					  &peer->hashPubKey);
+  if (cp == NULL)
+    return GNUNET_YES;
+  GNUNET_break (GNUNET_YES ==
+		GNUNET_CONTAINER_multihashmap_remove (connected_peers,
+						      &peer->hashPubKey,
+						      cp));
+  GNUNET_PEER_change_rc (cp->pid, -1);
+  GNUNET_free (cp);
+  return GNUNET_YES;
+}
+
+
+/**
  * Method called whenever a peer disconnects.
  *
  * @param cls closure, not used
@@ -1586,8 +1653,12 @@
 peer_disconnect_handler (void *cls,
 			 const struct GNUNET_PeerIdentity *peer)
 {
+
+  if (0 == memcmp (peer, me, sizeof (struct GNUNET_PeerIdentity)))
+    return;
   GNUNET_log (GNUNET_ERROR_TYPE_INFO,
 	      "Peer disconnected: %s\n", GNUNET_i2s (peer));
+  clean_peer (NULL, (const GNUNET_HashCode *) peer, NULL);
 }
 
 
@@ -1629,6 +1700,11 @@
       GNUNET_free (anonymous_list_head);
       anonymous_list_head = next_msg;
     }
+  GNUNET_CONTAINER_multihashmap_iterate (connected_peers,
+					 &clean_peer,
+					 NULL);
+  GNUNET_CONTAINER_multihashmap_destroy (connected_peers);
+  connected_peers = NULL;
 }
 
 
@@ -1701,6 +1777,7 @@
 		    NULL);
   cfg = c;
   nc = GNUNET_SERVER_notification_context_create (server, 16);
+  connected_peers = GNUNET_CONTAINER_multihashmap_create (EXPECTED_NEIGHBOUR_COUNT);
   GNUNET_SERVER_add_handlers (server, handlers);
   core = GNUNET_CORE_connect (cfg,
 			      QUEUE_SIZE,

2011-03-03 05:13

 

gnunet-svn@14557-chat-indentation-fix.patch (125,001 bytes)
diff -ur gnunet/src/chat/chat.c gnunet.notabs/src/chat/chat.c
--- gnunet/src/chat/chat.c	2011-03-03 03:10:25.413335822 +0300
+++ gnunet.notabs/src/chat/chat.c	2011-03-03 06:50:07.206669157 +0300
@@ -162,8 +162,8 @@
  */
 static size_t
 transmit_acknowledge_request (void *cls,
-			      size_t size, 
-			      void *buf)
+                              size_t size, 
+                              void *buf)
 {
   struct GNUNET_CHAT_SendReceiptContext *src = cls;
   struct ConfirmationReceiptMessage *receipt;
@@ -174,12 +174,12 @@
   if (NULL == buf)
     {
       GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-		  _("Could not transmit confirmation receipt\n"));
+                  _("Could not transmit confirmation receipt\n"));
       return 0;
     }
 #if DEBUG_CHAT
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-	      "Transmitting confirmation receipt to the service\n");
+              "Transmitting confirmation receipt to the service\n");
 #endif
   msg_size = sizeof (struct ConfirmationReceiptMessage);
   GNUNET_assert (size >= msg_size);
@@ -192,23 +192,23 @@
   receipt->timestamp = GNUNET_TIME_absolute_hton (GNUNET_TIME_absolute_get ());
   GNUNET_CRYPTO_rsa_key_get_public (src->chat_room->my_private_key, &pub_key);
   GNUNET_CRYPTO_hash (&pub_key,
-		      sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
-		      &receipt->target);
+                      sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
+                      &receipt->target);
   receipt->author = src->received_msg->sender;
   receipt->purpose.purpose =
     htonl (GNUNET_SIGNATURE_PURPOSE_CHAT_RECEIPT);
   receipt->purpose.size =
     htonl (msg_size -
-	   sizeof (struct GNUNET_MessageHeader) -
-	   sizeof (uint32_t) -
-	   sizeof (struct GNUNET_CRYPTO_RsaSignature));
+           sizeof (struct GNUNET_MessageHeader) -
+           sizeof (uint32_t) -
+           sizeof (struct GNUNET_CRYPTO_RsaSignature));
   msg_len = ntohs (src->received_msg->header.size) -
     sizeof (struct ReceiveNotificationMessage);
   GNUNET_CRYPTO_hash (&src->received_msg[1], msg_len, &receipt->content);
   GNUNET_assert (GNUNET_OK == 
-		 GNUNET_CRYPTO_rsa_sign (src->chat_room->my_private_key,
-					 &receipt->purpose,
-					 &receipt->signature));
+                 GNUNET_CRYPTO_rsa_sign (src->chat_room->my_private_key,
+                                         &receipt->purpose,
+                                         &receipt->signature));
   GNUNET_free (src->received_msg);
   GNUNET_free (src);
   return msg_size;
@@ -221,7 +221,7 @@
  */
 static void
 process_result (struct GNUNET_CHAT_Room *room,
-		const struct GNUNET_MessageHeader *reply)
+                const struct GNUNET_MessageHeader *reply)
 {
   struct LeaveNotificationMessage *leave_msg;
   struct JoinNotificationMessage *join_msg;
@@ -249,80 +249,80 @@
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Got a join notification\n");
 #endif
       if (size < sizeof (struct JoinNotificationMessage))
-	{
-	  GNUNET_break (0);
-	  return;
-	}
+        {
+          GNUNET_break (0);
+          return;
+        }
       join_msg = (struct JoinNotificationMessage *) reply;
       meta_len = size - sizeof (struct JoinNotificationMessage);
       meta =
-	GNUNET_CONTAINER_meta_data_deserialize ((const char *) &join_msg[1],
-						meta_len);
+        GNUNET_CONTAINER_meta_data_deserialize ((const char *) &join_msg[1],
+                                                meta_len);
       if (NULL == meta)
-	{
-	  GNUNET_break (0);
-	  return;
-	}
+        {
+          GNUNET_break (0);
+          return;
+        }
       pos = GNUNET_malloc (sizeof (struct MemberList));
       pos->meta = meta;
       GNUNET_CRYPTO_hash (&join_msg->public_key,
-			  sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
-			  &pos->id);
+                          sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
+                          &pos->id);
       GNUNET_PSEUDONYM_add (room->cfg, &pos->id, meta);
       pos->next = room->members;
       room->members = pos;
       if (GNUNET_NO == room->is_joined)
-	{
-	  GNUNET_CRYPTO_rsa_key_get_public (room->my_private_key, &pkey);
-	  if (0 == memcmp (&join_msg->public_key,
-			   &pkey,
-			   sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded)))
-	    {
-	      room->join_callback (room->join_callback_cls);
-	      room->is_joined = GNUNET_YES;
-	    }
-	  else
-	    {
-	      GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-			  _("The current user must be the the first one joined\n"));
-	      GNUNET_break (0);
-	      return;
-	    }
-	}
+        {
+          GNUNET_CRYPTO_rsa_key_get_public (room->my_private_key, &pkey);
+          if (0 == memcmp (&join_msg->public_key,
+                           &pkey,
+                           sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded)))
+            {
+              room->join_callback (room->join_callback_cls);
+              room->is_joined = GNUNET_YES;
+            }
+          else
+            {
+              GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                          _("The current user must be the the first one joined\n"));
+              GNUNET_break (0);
+              return;
+            }
+        }
       else 
       room->member_list_callback (room->member_list_callback_cls,
-				  meta, &join_msg->public_key,
-				  ntohl (join_msg->msg_options));
+                                  meta, &join_msg->public_key,
+                                  ntohl (join_msg->msg_options));
       break;
     case GNUNET_MESSAGE_TYPE_CHAT_LEAVE_NOTIFICATION:
 #if DEBUG_CHAT
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Got a leave notification\n");
 #endif
       if (size < sizeof (struct LeaveNotificationMessage))
-	{
-	  GNUNET_break (0);
-	  return;
-	}
+        {
+          GNUNET_break (0);
+          return;
+        }
       leave_msg = (struct LeaveNotificationMessage *) reply;
       room->member_list_callback (room->member_list_callback_cls,
-				  NULL, &leave_msg->user,
-				  GNUNET_CHAT_MSG_OPTION_NONE);
+                                  NULL, &leave_msg->user,
+                                  GNUNET_CHAT_MSG_OPTION_NONE);
       GNUNET_CRYPTO_hash (&leave_msg->user,
-			  sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
-			  &id);
+                          sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
+                          &id);
       prev = NULL;
       pos = room->members;
       while ((NULL != pos) &&
-	     (0 != memcmp (&pos->id, &id, sizeof (GNUNET_HashCode))))
-	{
-	  prev = pos;
-	  pos = pos->next;
-	}
+             (0 != memcmp (&pos->id, &id, sizeof (GNUNET_HashCode))))
+        {
+          prev = pos;
+          pos = pos->next;
+        }
       GNUNET_assert (NULL != pos);
       if (NULL == prev)
-	room->members = pos->next;
+        room->members = pos->next;
       else
-	prev->next = pos->next;
+        prev->next = pos->next;
       GNUNET_CONTAINER_meta_data_destroy (pos->meta);
       GNUNET_free (pos);
       break;
@@ -331,96 +331,96 @@
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Got a message notification\n");
 #endif
       if (size <= sizeof (struct ReceiveNotificationMessage))
-	{
-	  GNUNET_break (0);
-	  return;
-	}
+        {
+          GNUNET_break (0);
+          return;
+        }
       received_msg = (struct ReceiveNotificationMessage *) reply;
       if (0 !=
-	  (ntohl (received_msg->msg_options) & GNUNET_CHAT_MSG_ACKNOWLEDGED))
-	{
-	  src = GNUNET_malloc (sizeof (struct GNUNET_CHAT_SendReceiptContext));
-	  src->chat_room = room;
-	  src->received_msg = GNUNET_memdup (received_msg, size);
-	  GNUNET_CLIENT_notify_transmit_ready (room->client,
-					       sizeof (struct ConfirmationReceiptMessage),
-					       GNUNET_CONSTANTS_SERVICE_TIMEOUT,
-					       GNUNET_YES,
-					       &transmit_acknowledge_request,
-					       src);
-	}
+          (ntohl (received_msg->msg_options) & GNUNET_CHAT_MSG_ACKNOWLEDGED))
+        {
+          src = GNUNET_malloc (sizeof (struct GNUNET_CHAT_SendReceiptContext));
+          src->chat_room = room;
+          src->received_msg = GNUNET_memdup (received_msg, size);
+          GNUNET_CLIENT_notify_transmit_ready (room->client,
+                                               sizeof (struct ConfirmationReceiptMessage),
+                                               GNUNET_CONSTANTS_SERVICE_TIMEOUT,
+                                               GNUNET_YES,
+                                               &transmit_acknowledge_request,
+                                               src);
+        }
       msg_len = size - sizeof (struct ReceiveNotificationMessage);
       if (0 !=
-	  (ntohl (received_msg->msg_options) & GNUNET_CHAT_MSG_PRIVATE))
-	{
-	  if (-1 == GNUNET_CRYPTO_rsa_decrypt (room->my_private_key,
-					       &received_msg->encrypted_key,
-					       &key,
-					       sizeof (struct GNUNET_CRYPTO_AesSessionKey)))
-	    {
-	      GNUNET_break (0);
-	      return;
-	    }
-	  msg_len = GNUNET_CRYPTO_aes_decrypt (&received_msg[1],
-					       msg_len,
-					       &key,
-					       (const struct GNUNET_CRYPTO_AesInitializationVector *) INITVALUE,
-					       decrypted_msg);
-	  message_content = decrypted_msg;
-	}
+          (ntohl (received_msg->msg_options) & GNUNET_CHAT_MSG_PRIVATE))
+        {
+          if (-1 == GNUNET_CRYPTO_rsa_decrypt (room->my_private_key,
+                                               &received_msg->encrypted_key,
+                                               &key,
+                                               sizeof (struct GNUNET_CRYPTO_AesSessionKey)))
+            {
+              GNUNET_break (0);
+              return;
+            }
+          msg_len = GNUNET_CRYPTO_aes_decrypt (&received_msg[1],
+                                               msg_len,
+                                               &key,
+                                               (const struct GNUNET_CRYPTO_AesInitializationVector *) INITVALUE,
+                                               decrypted_msg);
+          message_content = decrypted_msg;
+        }
       else
-	{
-	  message_content = GNUNET_malloc (msg_len + 1);
-	  memcpy (message_content, &received_msg[1], msg_len);
-	}
+        {
+          message_content = GNUNET_malloc (msg_len + 1);
+          memcpy (message_content, &received_msg[1], msg_len);
+        }
       message_content[msg_len] = '\0';
       if (0 != (ntohl (received_msg->msg_options) & GNUNET_CHAT_MSG_ANONYMOUS))
-	{
-	  sender = NULL;
-	  meta = NULL;
-	}
+        {
+          sender = NULL;
+          meta = NULL;
+        }
       else
-	{
+        {
       pos = room->members;
       while ((NULL != pos) &&
-	     (0 != memcmp (&pos->id,
-			   &received_msg->sender,
-			   sizeof (GNUNET_HashCode))))
-	pos = pos->next;
+             (0 != memcmp (&pos->id,
+                           &received_msg->sender,
+                           sizeof (GNUNET_HashCode))))
+        pos = pos->next;
       GNUNET_assert (NULL != pos);
-	  sender = &received_msg->sender;
-	  meta = pos->meta;
-	}
+          sender = &received_msg->sender;
+          meta = pos->meta;
+        }
       room->message_callback (room->message_callback_cls,
-			      room,
-			      sender,
-			      meta,
-			      message_content,
-			      GNUNET_TIME_absolute_ntoh (received_msg->timestamp),
-			      ntohl (received_msg->msg_options));
+                              room,
+                              sender,
+                              meta,
+                              message_content,
+                              GNUNET_TIME_absolute_ntoh (received_msg->timestamp),
+                              ntohl (received_msg->msg_options));
       if (message_content != decrypted_msg)
-	GNUNET_free (message_content);
+        GNUNET_free (message_content);
       break;
     case GNUNET_MESSAGE_TYPE_CHAT_CONFIRMATION_NOTIFICATION:
 #if DEBUG_CHAT
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Got a confirmation receipt\n");
 #endif
       if (size < sizeof (struct ConfirmationReceiptMessage))
-	{
-	  GNUNET_break (0);
-	  return;
-	}
+        {
+          GNUNET_break (0);
+          return;
+        }
       receipt = (struct ConfirmationReceiptMessage *) reply;
       if (NULL != room->confirmation_callback)
-	room->confirmation_callback (room->confirmation_cls,
-				     room,
-				     ntohl (receipt->sequence_number),
-				     GNUNET_TIME_absolute_ntoh (receipt->timestamp),
-				     &receipt->target);
+        room->confirmation_callback (room->confirmation_cls,
+                                     room,
+                                     ntohl (receipt->sequence_number),
+                                     GNUNET_TIME_absolute_ntoh (receipt->timestamp),
+                                     &receipt->target);
       break;
     default:
       GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-		  _("Unknown message type: '%u'\n"), ntohs (reply->type));
+                  _("Unknown message type: '%u'\n"), ntohs (reply->type));
       GNUNET_break_op (0);
       break;
     }
@@ -436,7 +436,7 @@
  */
 static void 
 receive_results (void *cls,
-		 const struct GNUNET_MessageHeader *msg)
+                 const struct GNUNET_MessageHeader *msg)
 {
   struct GNUNET_CHAT_Room *chat_room = cls;
 
@@ -456,9 +456,9 @@
     return; /* fatal error */
   /* continue receiving */
   GNUNET_CLIENT_receive (chat_room->client,
-			 &receive_results,
-			 chat_room,
-			 GNUNET_TIME_UNIT_FOREVER_REL);
+                         &receive_results,
+                         chat_room,
+                         GNUNET_TIME_UNIT_FOREVER_REL);
 }
 
 
@@ -469,7 +469,7 @@
  */
 static struct GNUNET_CRYPTO_RsaPrivateKey *
 init_private_key (const struct GNUNET_CONFIGURATION_Handle *cfg,
-		  const char *nick_name)
+                  const char *nick_name)
 {
   char *home;
   char *keyfile;
@@ -480,29 +480,29 @@
 #endif
   if (GNUNET_OK !=
       GNUNET_CONFIGURATION_get_value_filename (cfg,
-					       "chat",
-					       "HOME",
-					       &home))
+                                               "chat",
+                                               "HOME",
+                                               &home))
     {
       GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-		  _("Configuration option `%s' in section `%s' missing\n"),
-		  "HOME",
-		  "chat");
+                  _("Configuration option `%s' in section `%s' missing\n"),
+                  "HOME",
+                  "chat");
       return NULL;
     }
   GNUNET_DISK_directory_create (home);
   if (GNUNET_OK != GNUNET_DISK_directory_test (home))
     {
       GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-		  _("Failed to access chat home directory `%s'\n"),
-		  home);
+                  _("Failed to access chat home directory `%s'\n"),
+                  home);
       GNUNET_free (home);
       return NULL;
     }
   /* read or create private key */
   keyfile =
     GNUNET_malloc (strlen (home) + strlen (NICK_IDENTITY_PREFIX) +
-		   strlen (nick_name) + 2);
+                   strlen (nick_name) + 2);
   strcpy (keyfile, home);
   GNUNET_free (home);
   if (keyfile[strlen (keyfile) - 1] != DIR_SEPARATOR)
@@ -513,8 +513,8 @@
   if (NULL == privKey)
     {
       GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-		  _("Failed to create/open key in file `%s'\n"),
-		  keyfile);
+                  _("Failed to create/open key in file `%s'\n"),
+                  keyfile);
     }
   GNUNET_free (keyfile);
   return privKey;
@@ -531,8 +531,8 @@
  */
 static size_t
 transmit_join_request (void *cls,
-		       size_t size, 
-		       void *buf)
+                       size_t size, 
+                       void *buf)
 {
   struct GNUNET_CHAT_Room *chat_room = cls;
   struct JoinRequestMessage *join_msg;
@@ -546,14 +546,14 @@
     {
 #if DEBUG_CHAT
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-		  "Could not transmit join request, retrying...\n");
+                  "Could not transmit join request, retrying...\n");
 #endif
       rejoin_room (chat_room);
       return 0;
     }
 #if DEBUG_CHAT
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-	      "Transmitting join request to the service\n");
+              "Transmitting join request to the service\n");
 #endif
   room_len = strlen (chat_room->room_name);
   meta_len = GNUNET_CONTAINER_meta_data_get_serialized_size (chat_room->member_info);
@@ -571,18 +571,18 @@
   meta = &room[room_len];
   if (GNUNET_SYSERR ==
       GNUNET_CONTAINER_meta_data_serialize (chat_room->member_info,
-					    &meta,
-					    meta_len,
-					    GNUNET_CONTAINER_META_DATA_SERIALIZE_FULL))
+                                            &meta,
+                                            meta_len,
+                                            GNUNET_CONTAINER_META_DATA_SERIALIZE_FULL))
     {
       GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-		  _("Could not serialize metadata\n"));
+                  _("Could not serialize metadata\n"));
       return 0;
     }
   GNUNET_CLIENT_receive (chat_room->client,
-			 &receive_results,
-			 chat_room,
-			 GNUNET_TIME_UNIT_FOREVER_REL);
+                         &receive_results,
+                         chat_room,
+                         GNUNET_TIME_UNIT_FOREVER_REL);
   return size_of_join;
 }
 
@@ -600,11 +600,11 @@
     strlen (chat_room->room_name);
   if (NULL ==
       GNUNET_CLIENT_notify_transmit_ready (chat_room->client,
-					   size_of_join,
-					   GNUNET_CONSTANTS_SERVICE_TIMEOUT,
-					   GNUNET_YES,
-					   &transmit_join_request,
-					   chat_room))
+                                           size_of_join,
+                                           GNUNET_CONSTANTS_SERVICE_TIMEOUT,
+                                           GNUNET_YES,
+                                           &transmit_join_request,
+                                           chat_room))
     return GNUNET_SYSERR;
   return GNUNET_OK;
 }
@@ -620,7 +620,7 @@
 
 #if DEBUG_CHAT
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-	      "Leaving the room '%s'\n", chat_room->room_name);
+              "Leaving the room '%s'\n", chat_room->room_name);
 #endif
   GNUNET_CLIENT_disconnect (chat_room->client, GNUNET_NO);
   GNUNET_free (chat_room->room_name);
@@ -660,19 +660,19 @@
  */
 struct GNUNET_CHAT_Room *
 GNUNET_CHAT_join_room (const struct GNUNET_CONFIGURATION_Handle *cfg,
-		       const char *nick_name,
-		       struct GNUNET_CONTAINER_MetaData *member_info,
-		       const char *room_name,
-		       enum GNUNET_CHAT_MsgOptions msg_options,
-		       GNUNET_CHAT_JoinCallback joinCallback,
-		       void *join_cls,
-		       GNUNET_CHAT_MessageCallback messageCallback,
-		       void *message_cls,
-		       GNUNET_CHAT_MemberListCallback memberCallback,
-		       void *member_cls,
-		       GNUNET_CHAT_MessageConfirmation confirmationCallback,
-		       void *confirmation_cls,
-		       GNUNET_HashCode *me)
+                       const char *nick_name,
+                       struct GNUNET_CONTAINER_MetaData *member_info,
+                       const char *room_name,
+                       enum GNUNET_CHAT_MsgOptions msg_options,
+                       GNUNET_CHAT_JoinCallback joinCallback,
+                       void *join_cls,
+                       GNUNET_CHAT_MessageCallback messageCallback,
+                       void *message_cls,
+                       GNUNET_CHAT_MemberListCallback memberCallback,
+                       void *member_cls,
+                       GNUNET_CHAT_MessageConfirmation confirmationCallback,
+                       void *confirmation_cls,
+                       GNUNET_HashCode *me)
 {
   struct GNUNET_CHAT_Room *chat_room;
   struct GNUNET_CRYPTO_RsaPrivateKey *priv_key;
@@ -687,32 +687,32 @@
     return NULL;
   GNUNET_CRYPTO_rsa_key_get_public (priv_key, &pub_key);
   GNUNET_CRYPTO_hash (&pub_key,
-		      sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
-		      me);
+                      sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
+                      me);
   GNUNET_PSEUDONYM_add (cfg, me, member_info);
   client = GNUNET_CLIENT_connect ("chat", cfg);
   if (NULL == client)
     {
       GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-		  _("Failed to connect to the chat service\n"));
+                  _("Failed to connect to the chat service\n"));
       return NULL;
     }
   if (NULL == joinCallback)
     {
       GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-		  _("Undefined mandatory parameter: joinCallback\n"));
+                  _("Undefined mandatory parameter: joinCallback\n"));
       return NULL;
     }
   if (NULL == messageCallback)
     {
       GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-		  _("Undefined mandatory parameter: messageCallback\n"));
+                  _("Undefined mandatory parameter: messageCallback\n"));
       return NULL;
     }
   if (NULL == memberCallback)
     {
       GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-		  _("Undefined mandatory parameter: memberCallback\n"));
+                  _("Undefined mandatory parameter: memberCallback\n"));
       return NULL;
     }
   chat_room = GNUNET_malloc (sizeof (struct GNUNET_CHAT_Room));
@@ -751,8 +751,8 @@
  */
 static size_t
 transmit_send_request (void *cls,
-		       size_t size, 
-		       void *buf)
+                       size_t size, 
+                       void *buf)
 {
   struct GNUNET_CHAT_SendMessageContext *smc = cls;
   struct TransmitRequestMessage *msg_to_send;
@@ -762,13 +762,13 @@
     {
 #if DEBUG_CHAT
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-		  "Could not transmit a chat message\n");
+                  "Could not transmit a chat message\n");
 #endif
       return 0;
     }
 #if DEBUG_CHAT
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-	      "Transmitting a chat message to the service\n");
+              "Transmitting a chat message to the service\n");
 #endif
   msg_size = strlen (smc->message) + sizeof (struct TransmitRequestMessage);
   GNUNET_assert (size >= msg_size);
@@ -784,8 +784,8 @@
     memset (&msg_to_send->target, 0, sizeof (GNUNET_HashCode));
   else
     GNUNET_CRYPTO_hash (smc->receiver,
-			sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
-			&msg_to_send->target);
+                        sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
+                        &msg_to_send->target);
   memcpy (&msg_to_send[1], smc->message, strlen (smc->message));
   /**
    * Client don't encode private messages since public keys of other members are
@@ -794,15 +794,15 @@
   if (smc->options & GNUNET_CHAT_MSG_AUTHENTICATED)
     {
       msg_to_send->purpose.purpose =
-	htonl (GNUNET_SIGNATURE_PURPOSE_CHAT_MESSAGE);
+        htonl (GNUNET_SIGNATURE_PURPOSE_CHAT_MESSAGE);
       msg_to_send->purpose.size =
-	htonl (msg_size -
-	       sizeof (struct GNUNET_MessageHeader) -
-	       sizeof (struct GNUNET_CRYPTO_RsaSignature));
+        htonl (msg_size -
+               sizeof (struct GNUNET_MessageHeader) -
+               sizeof (struct GNUNET_CRYPTO_RsaSignature));
       GNUNET_assert (GNUNET_OK == 
-		     GNUNET_CRYPTO_rsa_sign (smc->chat_room->my_private_key,
-					     &msg_to_send->purpose,
-					     &msg_to_send->signature));
+                     GNUNET_CRYPTO_rsa_sign (smc->chat_room->my_private_key,
+                                             &msg_to_send->purpose,
+                                             &msg_to_send->signature));
     }
   GNUNET_free (smc->message);
   GNUNET_free (smc);
@@ -821,10 +821,10 @@
  */
 void
 GNUNET_CHAT_send_message (struct GNUNET_CHAT_Room *room,
-			  const char *message,
-			  enum GNUNET_CHAT_MsgOptions options,
-			  const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *receiver,
-			  uint32_t *sequence_number)
+                          const char *message,
+                          enum GNUNET_CHAT_MsgOptions options,
+                          const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *receiver,
+                          uint32_t *sequence_number)
 {
   size_t msg_size;
   struct GNUNET_CHAT_SendMessageContext *smc;
@@ -843,11 +843,11 @@
   smc->sequence_number = room->sequence_number;
   msg_size = strlen (message) + sizeof (struct TransmitRequestMessage);
   GNUNET_CLIENT_notify_transmit_ready (room->client,
-				       msg_size,
-				       GNUNET_CONSTANTS_SERVICE_TIMEOUT,
-				       GNUNET_YES,
-				       &transmit_send_request,
-				       smc);
+                                       msg_size,
+                                       GNUNET_CONSTANTS_SERVICE_TIMEOUT,
+                                       GNUNET_YES,
+                                       &transmit_send_request,
+                                       smc);
 }
 
 /* end of chat.c */
diff -ur gnunet/src/chat/gnunet-chat.c gnunet.notabs/src/chat/gnunet-chat.c
--- gnunet/src/chat/gnunet-chat.c	2011-03-03 05:59:37.126669158 +0300
+++ gnunet.notabs/src/chat/gnunet-chat.c	2011-03-03 06:51:25.066669158 +0300
@@ -105,12 +105,12 @@
  */
 static int
 receive_cb (void *cls,
-	    struct GNUNET_CHAT_Room *room,
-	    const GNUNET_HashCode *sender,
-	    const struct GNUNET_CONTAINER_MetaData *member_info,
-	    const char *message,
-	    struct GNUNET_TIME_Absolute timestamp,
-	    enum GNUNET_CHAT_MsgOptions options)
+            struct GNUNET_CHAT_Room *room,
+            const GNUNET_HashCode *sender,
+            const struct GNUNET_CONTAINER_MetaData *member_info,
+            const char *message,
+            struct GNUNET_TIME_Absolute timestamp,
+            enum GNUNET_CHAT_MsgOptions options)
 {
   char *nick;
   char *time;
@@ -181,10 +181,10 @@
  */
 static int
 confirmation_cb (void *cls,
-		 struct GNUNET_CHAT_Room *room,
-		 uint32_t orig_seq_number,
-		 struct GNUNET_TIME_Absolute timestamp,
-		 const GNUNET_HashCode *receiver)
+                 struct GNUNET_CHAT_Room *room,
+                 uint32_t orig_seq_number,
+                 struct GNUNET_TIME_Absolute timestamp,
+                 const GNUNET_HashCode *receiver)
 {
   char *nick;
 
@@ -206,9 +206,9 @@
  */
 static int
 member_list_cb (void *cls,
-		const struct GNUNET_CONTAINER_MetaData *member_info,
-		const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *member_id,
-		enum GNUNET_CHAT_MsgOptions options)
+                const struct GNUNET_CONTAINER_MetaData *member_info,
+                const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *member_id,
+                enum GNUNET_CHAT_MsgOptions options)
 {
   char *nick;
   GNUNET_HashCode id;
@@ -216,11 +216,11 @@
   struct UserList *prev;
 
   GNUNET_CRYPTO_hash (member_id,
-		      sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
-		      &id);
+                      sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
+                      &id);
   nick = GNUNET_PSEUDONYM_id_to_name (cfg, &id);
   fprintf (stdout, member_info != NULL
-	   ? _("`%s' entered the room\n") : _("`%s' left the room\n"), nick);
+           ? _("`%s' entered the room\n") : _("`%s' left the room\n"), nick);
   GNUNET_free (nick);
   if (NULL != member_info)
     {
@@ -237,25 +237,25 @@
       prev = NULL;
       pos = users;
       while ((NULL != pos) &&
-	     (0 != memcmp (&pos->pkey,
-			   member_id,
-			   sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded))))
-	{
-	  prev = pos;
-	  pos = pos->next;
-	}
+             (0 != memcmp (&pos->pkey,
+                           member_id,
+                           sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded))))
+        {
+          prev = pos;
+          pos = pos->next;
+        }
       if (NULL == pos)
-	{
-	  GNUNET_break (0);
-	}
+        {
+          GNUNET_break (0);
+        }
       else
-	{
-	  if (NULL == prev)
-	    users = pos->next;
-	  else
-	    prev->next = pos->next;
-	  GNUNET_free (pos);
-	}
+        {
+          if (NULL == prev)
+            users = pos->next;
+          else
+            prev->next = pos->next;
+          GNUNET_free (pos);
+        }
     }
   return GNUNET_OK;
 }
@@ -274,14 +274,14 @@
   GNUNET_free (room_name);
   room_name = GNUNET_strdup (arg);
   room = GNUNET_CHAT_join_room (cfg,
-				nickname,
-				meta,
-				room_name,
-				-1,
-				&join_cb, NULL,
-				&receive_cb, NULL,
-				&member_list_cb, NULL,
-				&confirmation_cb, NULL, &me);
+                                nickname,
+                                meta,
+                                room_name,
+                                -1,
+                                &join_cb, NULL,
+                                &receive_cb, NULL,
+                                &member_list_cb, NULL,
+                                &confirmation_cb, NULL, &me);
   if (NULL == room)
     {
       fprintf (stdout, _("Could not change username\n"));
@@ -307,21 +307,21 @@
   nickname = GNUNET_strdup (msg);
   meta = GNUNET_CONTAINER_meta_data_create ();
   GNUNET_CONTAINER_meta_data_insert (meta,
-				     "<gnunet>",
-				     EXTRACTOR_METATYPE_TITLE,
-				     EXTRACTOR_METAFORMAT_UTF8,
-				     "text/plain",
-				     nickname,
-				     strlen(nickname)+1);
+                                     "<gnunet>",
+                                     EXTRACTOR_METATYPE_TITLE,
+                                     EXTRACTOR_METAFORMAT_UTF8,
+                                     "text/plain",
+                                     nickname,
+                                     strlen(nickname)+1);
   room = GNUNET_CHAT_join_room (cfg,
-				nickname,
-				meta,
-				room_name,
-				-1,
-				&join_cb, NULL,
-				&receive_cb, NULL,
-				&member_list_cb, NULL,
-				&confirmation_cb, NULL, &me);
+                                nickname,
+                                meta,
+                                room_name,
+                                -1,
+                                &join_cb, NULL,
+                                &receive_cb, NULL,
+                                &member_list_cb, NULL,
+                                &confirmation_cb, NULL, &me);
   if (NULL == room)
     {
       fprintf (stdout, _("Could not change username\n"));
@@ -346,8 +346,8 @@
   while (NULL != pos)
     {
       GNUNET_CRYPTO_hash (&pos->pkey,
-			  sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
-			  &pid);
+                          sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
+                          &pid);
       name = GNUNET_PSEUDONYM_id_to_name (cfg, &pid);
       fprintf (stdout, "`%s' ", name);
       GNUNET_free (name);
@@ -363,9 +363,9 @@
 {
   uint32_t seq;
   GNUNET_CHAT_send_message (room,
-			    msg,
-			    GNUNET_CHAT_MSG_OPTION_NONE,
-			    NULL, &seq);
+                            msg,
+                            GNUNET_CHAT_MSG_OPTION_NONE,
+                            NULL, &seq);
   return GNUNET_OK;
 }
 
@@ -397,10 +397,10 @@
   while (NULL != pos)
     {
       GNUNET_CRYPTO_hash (&pos->pkey,
-			  sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
-			  &pid);
+                          sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
+                          &pid);
       if (0 == memcmp (&pid, &uid, sizeof (GNUNET_HashCode)))
-	break;
+        break;
       pos = pos->next;
     }
   if (NULL == pos)
@@ -410,10 +410,10 @@
       return GNUNET_OK;
     }
   GNUNET_CHAT_send_message (room,
-			    msg,
-			    GNUNET_CHAT_MSG_PRIVATE,
-			    &pos->pkey,
-			    &seq);
+                            msg,
+                            GNUNET_CHAT_MSG_PRIVATE,
+                            &pos->pkey,
+                            &seq);
   GNUNET_free (user);
   return GNUNET_OK;
 }
@@ -424,9 +424,9 @@
 {
   uint32_t seq;
   GNUNET_CHAT_send_message (room,
-			    msg,
-			    GNUNET_CHAT_MSG_AUTHENTICATED,
-			    NULL, &seq);
+                            msg,
+                            GNUNET_CHAT_MSG_AUTHENTICATED,
+                            NULL, &seq);
   return GNUNET_OK;
 }
 
@@ -436,9 +436,9 @@
 {
   uint32_t seq;
   GNUNET_CHAT_send_message (room,
-			    msg,
-			    GNUNET_CHAT_MSG_ACKNOWLEDGED,
-			    NULL, &seq);
+                            msg,
+                            GNUNET_CHAT_MSG_ACKNOWLEDGED,
+                            NULL, &seq);
   return GNUNET_OK;
 }
 
@@ -448,9 +448,9 @@
 {
   uint32_t seq;
   GNUNET_CHAT_send_message (room,
-			    msg,
-			    GNUNET_CHAT_MSG_ANONYMOUS,
-			    NULL, &seq);
+                            msg,
+                            GNUNET_CHAT_MSG_ANONYMOUS,
+                            NULL, &seq);
   return GNUNET_OK;
 }
 
@@ -525,14 +525,14 @@
   int i;
   i = 0;
   while ((NULL != args) &&
-	 (0 != strlen (args)) && (commands[i].Action != &do_help))
+         (0 != strlen (args)) && (commands[i].Action != &do_help))
     {
       if (0 ==
-	  strncasecmp (&args[1], &commands[i].command[1], strlen (args) - 1))
-	{
-	  fprintf (stdout, "%s\n", gettext (commands[i].helptext));
-	  return GNUNET_OK;
-	}
+          strncasecmp (&args[1], &commands[i].command[1], strlen (args) - 1))
+        {
+          fprintf (stdout, "%s\n", gettext (commands[i].helptext));
+          return GNUNET_OK;
+        }
       i++;
     }
   i = 0;
@@ -550,7 +550,7 @@
 
 static void 
 do_stop_task (void *cls,
-	      const struct GNUNET_SCHEDULER_TaskContext *tc)
+              const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
   GNUNET_CHAT_leave_room (room);
   if (handle_cmd_task != GNUNET_SCHEDULER_NO_TASK)
@@ -583,8 +583,8 @@
     goto next;
   i = 0;
   while ((NULL != commands[i].command) &&
-	 (0 != strncasecmp (commands[i].command,
-			    message, strlen (commands[i].command))))
+         (0 != strncasecmp (commands[i].command,
+                            message, strlen (commands[i].command))))
     i++;
   if (GNUNET_OK !=
       commands[i].Action (&message[strlen (commands[i].command)], NULL))
@@ -593,9 +593,9 @@
 next:
   handle_cmd_task =
     GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS,
-								 100),
-				  &handle_command,
-				  NULL);
+                                                                 100),
+                                  &handle_command,
+                                  NULL);
   return;
 
 out:
@@ -633,21 +633,21 @@
     room_name = GNUNET_strdup ("gnunet");
   meta = GNUNET_CONTAINER_meta_data_create ();
   GNUNET_CONTAINER_meta_data_insert (meta,
-				     "<gnunet>",
-				     EXTRACTOR_METATYPE_TITLE,
-				     EXTRACTOR_METAFORMAT_UTF8,
-				     "text/plain",
-				     nickname,
-				     strlen(nickname)+1);
+                                     "<gnunet>",
+                                     EXTRACTOR_METATYPE_TITLE,
+                                     EXTRACTOR_METAFORMAT_UTF8,
+                                     "text/plain",
+                                     nickname,
+                                     strlen(nickname)+1);
   room = GNUNET_CHAT_join_room (cfg,
-				nickname,
-				meta,
-				room_name,
-				-1,
-				&join_cb, NULL,
-				&receive_cb, NULL,
-				&member_list_cb, NULL,
-				&confirmation_cb, NULL, &me);
+                                nickname,
+                                meta,
+                                room_name,
+                                -1,
+                                &join_cb, NULL,
+                                &receive_cb, NULL,
+                                &member_list_cb, NULL,
+                                &confirmation_cb, NULL, &me);
   if (NULL == room)
     {
       fprintf (stderr, _("Failed to join room `%s'\n"), room_name);
@@ -662,11 +662,11 @@
   GNUNET_free (my_name);
   handle_cmd_task =
     GNUNET_SCHEDULER_add_with_priority (GNUNET_SCHEDULER_PRIORITY_UI,
-					&handle_command,
-					NULL);
+                                        &handle_command,
+                                        NULL);
   GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL,
-				&do_stop_task,
-				NULL);
+                                &do_stop_task,
+                                NULL);
 }
 
 
@@ -697,11 +697,11 @@
   fcntl (0, F_SETFL, flags);
 #endif
   return (GNUNET_OK ==
-	  GNUNET_PROGRAM_run (argc,
-			      argv,
-			      "gnunet-chat",
-			      gettext_noop ("Join a chat on GNUnet."),
-			      options, &run, NULL)) ? ret : 1;
+          GNUNET_PROGRAM_run (argc,
+                              argv,
+                              "gnunet-chat",
+                              gettext_noop ("Join a chat on GNUnet."),
+                              options, &run, NULL)) ? ret : 1;
 }
 
 /* end of gnunet-chat.c */
diff -ur gnunet/src/chat/gnunet-service-chat.c gnunet.notabs/src/chat/gnunet-service-chat.c
--- gnunet/src/chat/gnunet-service-chat.c	2011-03-02 10:48:02.653335826 +0300
+++ gnunet.notabs/src/chat/gnunet-service-chat.c	2011-03-03 06:51:37.556669157 +0300
@@ -184,7 +184,7 @@
     {
       GNUNET_free (anon_msg);
       if (NULL != prev)
-	prev->next = NULL;
+        prev->next = NULL;
     }
 }
 
@@ -198,7 +198,7 @@
   GNUNET_CRYPTO_hash (p2p_rnmsg, ntohs (p2p_rnmsg->header.size), &hash);
   anon_msg = anonymous_list_head;
   while ((NULL != anon_msg) &&
-	 (0 != memcmp (&anon_msg->hash, &hash, sizeof (GNUNET_HashCode))))
+         (0 != memcmp (&anon_msg->hash, &hash, sizeof (GNUNET_HashCode))))
     anon_msg = anon_msg->next;
   return (NULL != anon_msg);
 }
@@ -214,8 +214,8 @@
  */
 static size_t
 transmit_message_notification_to_peer (void *cls,
-				       size_t size,
-				       void *buf)
+                                       size_t size,
+                                       void *buf)
 {
   struct P2PReceiveNotificationMessage *my_msg = cls;
   struct P2PReceiveNotificationMessage *m = buf;
@@ -223,14 +223,14 @@
 
 #if DEBUG_CHAT_SERVICE
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-	      "Transmitting P2P message notification\n");
+              "Transmitting P2P message notification\n");
 #endif
   if (buf == NULL)
     {
       /* client disconnected */
 #if DEBUG_CHAT_SERVICE
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-		  "Buffer is NULL, dropping the message\n");
+                  "Buffer is NULL, dropping the message\n");
 #endif
       return 0;
     }
@@ -247,8 +247,8 @@
  */
 static int
 send_message_noficiation (void *cls,
-			  const GNUNET_HashCode *key,
-			  void *value)
+                          const GNUNET_HashCode *key,
+                          void *value)
 {
   struct P2PReceiveNotificationMessage *msg = cls;
   struct ConnectedPeer *cp = value;
@@ -258,18 +258,18 @@
   GNUNET_PEER_resolve (cp->pid, &pid);
 #if DEBUG_CHAT_SERVICE
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-	      "Sending message notification to `%s'\n", GNUNET_i2s (&pid));
+              "Sending message notification to `%s'\n", GNUNET_i2s (&pid));
 #endif
   my_msg = GNUNET_memdup (msg, ntohs (msg->header.size));
   if (NULL == GNUNET_CORE_notify_transmit_ready (core,
-						 1,
-						 MAX_TRANSMIT_DELAY,
-						 &pid,
-						 ntohs (msg->header.size),
-						 &transmit_message_notification_to_peer,
-						 my_msg))
+                                                 1,
+                                                 MAX_TRANSMIT_DELAY,
+                                                 &pid,
+                                                 ntohs (msg->header.size),
+                                                 &transmit_message_notification_to_peer,
+                                                 my_msg))
     GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
-		_("Failed to queue a message notification\n"));
+                _("Failed to queue a message notification\n"));
   return GNUNET_YES;
 }
 
@@ -284,8 +284,8 @@
  */
 static void
 handle_transmit_request (void *cls,
-			 struct GNUNET_SERVER_Client *client,
-			 const struct GNUNET_MessageHeader *message)
+                         struct GNUNET_SERVER_Client *client,
+                         const struct GNUNET_MessageHeader *message)
 {
   static GNUNET_HashCode all_zeros;
   const struct TransmitRequestMessage *trmsg;
@@ -319,22 +319,22 @@
 #endif
       GNUNET_CRYPTO_aes_create_session_key (&key);
       msg_len = GNUNET_CRYPTO_aes_encrypt (&trmsg[1],
-					   msg_len,
-					   &key,
-					   (const struct GNUNET_CRYPTO_AesInitializationVector *) INITVALUE,
-					   encrypted_msg);
+                                           msg_len,
+                                           &key,
+                                           (const struct GNUNET_CRYPTO_AesInitializationVector *) INITVALUE,
+                                           encrypted_msg);
       if (-1 == msg_len)
-	{
-	  GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-		      "Could not encrypt the message text\n");
-	  GNUNET_break (0);
-	  GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
-	  return;
-	}
+        {
+          GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                      "Could not encrypt the message text\n");
+          GNUNET_break (0);
+          GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
+          return;
+        }
     }
   rnmsg = GNUNET_malloc (sizeof (struct ReceiveNotificationMessage) + msg_len);
   rnmsg->header.size = htons (sizeof (struct ReceiveNotificationMessage) +
-			      msg_len);
+                              msg_len);
   rnmsg->header.type = htons (GNUNET_MESSAGE_TYPE_CHAT_MESSAGE_NOTIFICATION);
   rnmsg->msg_options = trmsg->msg_options;
   rnmsg->timestamp = trmsg->timestamp;
@@ -344,8 +344,8 @@
   if (NULL == pos)
     {
       GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-		  "The client is not a member of a chat room. Client has to "
-		  "join a chat room first\n");
+                  "The client is not a member of a chat room. Client has to "
+                  "join a chat room first\n");
       GNUNET_break (0);
       GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
       GNUNET_free (rnmsg);
@@ -368,46 +368,46 @@
     {
 #if DEBUG_CHAT_SERVICE
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-		  "Encrypting the session key using the public key of '%s'\n",
-		  GNUNET_h2s (&trmsg->target));
+                  "Encrypting the session key using the public key of '%s'\n",
+                  GNUNET_h2s (&trmsg->target));
 #endif
       if (0 == memcmp (&all_zeros, &trmsg->target, sizeof (GNUNET_HashCode)))
-	{
-	  GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-		      "Malformed message: private, but no target\n");
-	  GNUNET_break (0);
-	  GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
-	  GNUNET_free (rnmsg);
-	  return;
-	}
+        {
+          GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                      "Malformed message: private, but no target\n");
+          GNUNET_break (0);
+          GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
+          GNUNET_free (rnmsg);
+          return;
+        }
       memcpy (&rnmsg[1], encrypted_msg, msg_len);
       target = client_list_head;
       while ((NULL != target) &&
-	     (0 != memcmp (&target->id,
-			   &trmsg->target,
-			   sizeof (GNUNET_HashCode))))
-	target = target->next;
+             (0 != memcmp (&target->id,
+                           &trmsg->target,
+                           sizeof (GNUNET_HashCode))))
+        target = target->next;
       if (NULL == target)
-	{
-	  GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-		      "Unknown target of the private message\n");
-	  GNUNET_break (0);
-	  GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
-	  GNUNET_free (rnmsg);
-	  return;
-	}
+        {
+          GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                      "Unknown target of the private message\n");
+          GNUNET_break (0);
+          GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
+          GNUNET_free (rnmsg);
+          return;
+        }
       if (GNUNET_SYSERR == GNUNET_CRYPTO_rsa_encrypt (&key,
-						      sizeof (struct GNUNET_CRYPTO_AesSessionKey),
-						      &target->public_key,
-						      &rnmsg->encrypted_key))
-	{
-	  GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-		      "Could not encrypt the session key\n");
-	  GNUNET_break (0);
-	  GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
-	  GNUNET_free (rnmsg);
-	  return;
-	}
+                                                      sizeof (struct GNUNET_CRYPTO_AesSessionKey),
+                                                      &target->public_key,
+                                                      &rnmsg->encrypted_key))
+        {
+          GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                      "Could not encrypt the session key\n");
+          GNUNET_break (0);
+          GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
+          GNUNET_free (rnmsg);
+          return;
+        }
     }
   else
     {
@@ -420,35 +420,35 @@
   while (NULL != pos)
     {
       if ((0 == strcmp (room, pos->room)) &&
-	  (NULL != pos->client) &&
-	  (pos->client != client))
-	{
-	  if (((!is_priv) ||
-	       (0 == memcmp (&trmsg->target,
-			     &pos->id,
-			     sizeof (GNUNET_HashCode)))) &&
-	      (0 == (ntohl (trmsg->msg_options) & (~pos->msg_options))))
-	    {
-	      GNUNET_SERVER_notification_context_unicast (nc,
-							  pos->client,
-							  &rnmsg->header,
-							  GNUNET_NO);
-	    }
-	}
+          (NULL != pos->client) &&
+          (pos->client != client))
+        {
+          if (((!is_priv) ||
+               (0 == memcmp (&trmsg->target,
+                             &pos->id,
+                             sizeof (GNUNET_HashCode)))) &&
+              (0 == (ntohl (trmsg->msg_options) & (~pos->msg_options))))
+            {
+              GNUNET_SERVER_notification_context_unicast (nc,
+                                                          pos->client,
+                                                          &rnmsg->header,
+                                                          GNUNET_NO);
+            }
+        }
       pos = pos->next;
     }
 #if DEBUG_CHAT_SERVICE
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-	      "Broadcasting message to neighbour peers\n");
+              "Broadcasting message to neighbour peers\n");
 #endif
   if (is_anon)
     {
       room_len = strlen (room);
       p2p_rnmsg = GNUNET_malloc (sizeof (struct P2PReceiveNotificationMessage) +
-				 msg_len + room_len);
+                                 msg_len + room_len);
       p2p_rnmsg->header.size =
-	htons (sizeof (struct P2PReceiveNotificationMessage) + msg_len +
-	       room_len);
+        htons (sizeof (struct P2PReceiveNotificationMessage) + msg_len +
+               room_len);
       p2p_rnmsg->room_name_len = htons (room_len);
       memcpy ((char *) &p2p_rnmsg[1], room, room_len);
       memcpy ((char *) &p2p_rnmsg[1] + room_len, &trmsg[1], msg_len);
@@ -456,15 +456,15 @@
   else
     {
   p2p_rnmsg = GNUNET_malloc (sizeof (struct P2PReceiveNotificationMessage) +
-			     msg_len);
+                             msg_len);
       p2p_rnmsg->header.size =
-	htons (sizeof (struct P2PReceiveNotificationMessage) + msg_len);
+        htons (sizeof (struct P2PReceiveNotificationMessage) + msg_len);
       if (is_priv)
     {
       memcpy (&p2p_rnmsg[1], encrypted_msg, msg_len);
       memcpy (&p2p_rnmsg->encrypted_key,
-	      &rnmsg->encrypted_key,
-	      sizeof (struct GNUNET_CRYPTO_RsaEncryptedData));
+              &rnmsg->encrypted_key,
+              sizeof (struct GNUNET_CRYPTO_RsaEncryptedData));
     }
   else
       memcpy (&p2p_rnmsg[1], &trmsg[1], msg_len);
@@ -479,8 +479,8 @@
   if (is_anon)
     remember_anonymous_message (p2p_rnmsg);
   GNUNET_CONTAINER_multihashmap_iterate (connected_peers,
-					 &send_message_noficiation,
-					 p2p_rnmsg);
+                                         &send_message_noficiation,
+                                         p2p_rnmsg);
   GNUNET_free (p2p_rnmsg);
   GNUNET_SERVER_receive_done (client, GNUNET_OK);
   GNUNET_free (rnmsg);
@@ -497,8 +497,8 @@
  */
 static size_t
 transmit_join_notification_to_peer (void *cls,
-				    size_t size,
-				    void *buf)
+                                    size_t size,
+                                    void *buf)
 {
   struct ChatClient *entry = cls;
   struct P2PJoinNotificationMessage *m = buf;
@@ -509,7 +509,7 @@
 
 #if DEBUG_CHAT_SERVICE
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-	      "Transmitting P2P join notification\n");
+              "Transmitting P2P join notification\n");
 #endif
   room_len = strlen (entry->room);
   meta_len = entry->meta_len;
@@ -536,8 +536,8 @@
  */
 static int
 send_join_noficiation (void *cls,
-		       const GNUNET_HashCode *key,
-		       void *value)
+                       const GNUNET_HashCode *key,
+                       void *value)
 {
   struct ChatClient *entry = cls;
   struct ConnectedPeer *cp = value;
@@ -547,20 +547,20 @@
   GNUNET_PEER_resolve (cp->pid, &pid);
 #if DEBUG_CHAT_SERVICE
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-	      "Sending join notification to `%s'\n", GNUNET_i2s (&pid));
+              "Sending join notification to `%s'\n", GNUNET_i2s (&pid));
 #endif
   msg_size = sizeof (struct P2PJoinNotificationMessage) +
     strlen (entry->room) + 
     entry->meta_len;
   if (NULL == GNUNET_CORE_notify_transmit_ready (core,
-						 1,
-						 MAX_TRANSMIT_DELAY,
-						 &pid,
-						 msg_size,
-						 &transmit_join_notification_to_peer,
-						 entry))
+                                                 1,
+                                                 MAX_TRANSMIT_DELAY,
+                                                 &pid,
+                                                 msg_size,
+                                                 &transmit_join_notification_to_peer,
+                                                 entry))
     GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
-		_("Failed to queue a join notification\n"));
+                _("Failed to queue a join notification\n"));
   return GNUNET_YES;
 }
 
@@ -575,8 +575,8 @@
  */
 static void
 handle_join_request (void *cls,
-		     struct GNUNET_SERVER_Client *client,
-		     const struct GNUNET_MessageHeader *message)
+                     struct GNUNET_SERVER_Client *client,
+                     const struct GNUNET_MessageHeader *message)
 {
   const struct JoinRequestMessage *jrmsg;
   char *room_name;
@@ -604,7 +604,7 @@
       room_name_len)
     {
       GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-		  "Malformed message: wrong length of the room name\n");
+                  "Malformed message: wrong length of the room name\n");
       GNUNET_break (0);
       GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
       return;
@@ -629,14 +629,14 @@
   else
     new_entry->member_info = NULL;
   GNUNET_CRYPTO_hash (&new_entry->public_key,
-		      sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
-		      &new_entry->id);
+                      sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
+                      &new_entry->id);
   new_entry->msg_options = ntohl (jrmsg->msg_options);
   new_entry->next = client_list_head;
   client_list_head = new_entry;
 #if DEBUG_CHAT_SERVICE
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-	      "Synchronizing room members between local clients\n");
+              "Synchronizing room members between local clients\n");
 #endif
   jnmsg = GNUNET_malloc (sizeof (struct JoinNotificationMessage) + meta_len);
   jnmsg->header.type = htons (GNUNET_MESSAGE_TYPE_CHAT_JOIN_NOTIFICATION);
@@ -650,41 +650,41 @@
   while (NULL != entry)
     {
       if (0 == strcmp (room_name, entry->room))
-	{
-	  if (NULL != entry->client)
-	    GNUNET_SERVER_notification_context_unicast (nc,
-							entry->client,
-							&jnmsg->header,
-							GNUNET_NO);
-	  if (entry->client != client)
-	    {
-	      entry_jnmsg =
-		GNUNET_malloc (sizeof (struct JoinNotificationMessage) +
-			       entry->meta_len);
-	      entry_jnmsg->header.type =
-		htons (GNUNET_MESSAGE_TYPE_CHAT_JOIN_NOTIFICATION);
-	      entry_jnmsg->header.size =
-		htons (sizeof (struct JoinNotificationMessage) +
-		       entry->meta_len);
-	      entry_jnmsg->msg_options = entry->msg_options;
-	      entry_jnmsg->public_key = entry->public_key;
-	      memcpy (&entry_jnmsg[1], entry->member_info, entry->meta_len);
-	      GNUNET_SERVER_notification_context_unicast (nc,
-							  client,
-							  &entry_jnmsg->header,
-							  GNUNET_NO);
-	      GNUNET_free (entry_jnmsg);
-	    }
-	}
+        {
+          if (NULL != entry->client)
+            GNUNET_SERVER_notification_context_unicast (nc,
+                                                        entry->client,
+                                                        &jnmsg->header,
+                                                        GNUNET_NO);
+          if (entry->client != client)
+            {
+              entry_jnmsg =
+                GNUNET_malloc (sizeof (struct JoinNotificationMessage) +
+                               entry->meta_len);
+              entry_jnmsg->header.type =
+                htons (GNUNET_MESSAGE_TYPE_CHAT_JOIN_NOTIFICATION);
+              entry_jnmsg->header.size =
+                htons (sizeof (struct JoinNotificationMessage) +
+                       entry->meta_len);
+              entry_jnmsg->msg_options = entry->msg_options;
+              entry_jnmsg->public_key = entry->public_key;
+              memcpy (&entry_jnmsg[1], entry->member_info, entry->meta_len);
+              GNUNET_SERVER_notification_context_unicast (nc,
+                                                          client,
+                                                          &entry_jnmsg->header,
+                                                          GNUNET_NO);
+              GNUNET_free (entry_jnmsg);
+            }
+        }
       entry = entry->next;
     }
 #if DEBUG_CHAT_SERVICE
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-	      "Broadcasting join notification to neighbour peers\n");
+              "Broadcasting join notification to neighbour peers\n");
 #endif
   GNUNET_CONTAINER_multihashmap_iterate (connected_peers,
-					 &send_join_noficiation,
-					 new_entry);
+                                         &send_join_noficiation,
+                                         new_entry);
   GNUNET_SERVER_receive_done (client, GNUNET_OK);
   GNUNET_free (jnmsg);
 }
@@ -699,23 +699,23 @@
  */
 static size_t
 transmit_confirmation_receipt_to_peer (void *cls,
-				       size_t size,
-				       void *buf)
+                                       size_t size,
+                                       void *buf)
 {
   struct P2PConfirmationReceiptMessage *receipt = cls;
   size_t msg_size;
 
 #if DEBUG_CHAT_SERVICE
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-	      "Transmitting P2P confirmation receipt to '%s'\n",
-	      GNUNET_h2s (&receipt->target));
+              "Transmitting P2P confirmation receipt to '%s'\n",
+              GNUNET_h2s (&receipt->target));
 #endif
   if (buf == NULL)
     {
       /* client disconnected */
 #if DEBUG_CHAT_SERVICE
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-		  "Buffer is NULL, dropping the message\n");
+                  "Buffer is NULL, dropping the message\n");
 #endif
       return 0;
     }
@@ -732,8 +732,8 @@
  */
 static int
 send_confirmation_receipt (void *cls,
-			   const GNUNET_HashCode *key,
-			   void *value)
+                           const GNUNET_HashCode *key,
+                           void *value)
 {
   struct P2PConfirmationReceiptMessage *receipt = cls;
   struct ConnectedPeer *cp = value;
@@ -744,20 +744,20 @@
   GNUNET_PEER_resolve (cp->pid, &pid);
 #if DEBUG_CHAT_SERVICE
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-	      "Sending confirmation receipt to `%s'\n", GNUNET_i2s (&pid));
+              "Sending confirmation receipt to `%s'\n", GNUNET_i2s (&pid));
 #endif
   msg_size = sizeof (struct P2PConfirmationReceiptMessage);
   my_receipt = GNUNET_memdup (receipt,
-			      sizeof (struct P2PConfirmationReceiptMessage));
+                              sizeof (struct P2PConfirmationReceiptMessage));
   if (NULL == GNUNET_CORE_notify_transmit_ready (core,
-						 1,
-						 MAX_TRANSMIT_DELAY,
-						 &pid,
-						 msg_size,
-						 &transmit_confirmation_receipt_to_peer,
-						 my_receipt))
+                                                 1,
+                                                 MAX_TRANSMIT_DELAY,
+                                                 &pid,
+                                                 msg_size,
+                                                 &transmit_confirmation_receipt_to_peer,
+                                                 my_receipt))
     GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
-		_("Failed to queue a confirmation receipt\n"));
+                _("Failed to queue a confirmation receipt\n"));
   return GNUNET_YES;
 }
 
@@ -773,8 +773,8 @@
  */
 static void
 handle_acknowledge_request (void *cls,
-			    struct GNUNET_SERVER_Client *client,
-			    const struct GNUNET_MessageHeader *message)
+                            struct GNUNET_SERVER_Client *client,
+                            const struct GNUNET_MessageHeader *message)
 {
   const struct ConfirmationReceiptMessage *receipt;
   struct ConfirmationReceiptMessage *crmsg;
@@ -786,28 +786,28 @@
   receipt = (const struct ConfirmationReceiptMessage *) message;
   author = client_list_head;
   while ((NULL != author) &&
-	 (0 != memcmp (&receipt->author,
-		       &author->id,
-		       sizeof (GNUNET_HashCode))))
+         (0 != memcmp (&receipt->author,
+                       &author->id,
+                       sizeof (GNUNET_HashCode))))
     author = author->next;
   if (NULL == author)
     {
       GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-		  "Unknown author of the original message\n");
+                  "Unknown author of the original message\n");
       GNUNET_break (0);
       GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
       return;
     }
   target = client_list_head;
   while ((NULL != target) &&
-	 (0 != memcmp (&receipt->target,
-		       &target->id,
-		       sizeof (GNUNET_HashCode))))
+         (0 != memcmp (&receipt->target,
+                       &target->id,
+                       sizeof (GNUNET_HashCode))))
     target = target->next;
   if (NULL == target)
     {
       GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-		  "Unknown target of the confirmation receipt\n");
+                  "Unknown target of the confirmation receipt\n");
       GNUNET_break (0);
       GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
       return;
@@ -817,8 +817,8 @@
       target->rcpt_sequence_number++;
 #if DEBUG_CHAT_SERVICE
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-		  "Broadcasting %s's receipt #%u to neighbour peers\n",
-		  GNUNET_h2s (&target->id), target->rcpt_sequence_number);
+                  "Broadcasting %s's receipt #%u to neighbour peers\n",
+                  GNUNET_h2s (&target->id), target->rcpt_sequence_number);
 #endif
       p2p_crmsg = GNUNET_malloc (sizeof (struct P2PConfirmationReceiptMessage));
       p2p_crmsg->header.size = htons (sizeof (struct P2PConfirmationReceiptMessage));
@@ -832,38 +832,38 @@
       p2p_crmsg->content = receipt->content;
       p2p_crmsg->sequence_number = htonl (target->rcpt_sequence_number);
       GNUNET_CONTAINER_multihashmap_iterate (connected_peers,
-					     &send_confirmation_receipt,
-					     p2p_crmsg);
+                                             &send_confirmation_receipt,
+                                             p2p_crmsg);
       GNUNET_free (p2p_crmsg);
     }
   else
     {
 #if DEBUG_CHAT_SERVICE
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-		  "Verifying signature of the receipt\n");
+                  "Verifying signature of the receipt\n");
 #endif
       if (GNUNET_OK !=
-	  GNUNET_CRYPTO_rsa_verify (GNUNET_SIGNATURE_PURPOSE_CHAT_RECEIPT,
-				    &receipt->purpose,
-				    &receipt->signature,
-				    &target->public_key))
-	{
-	  GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-		      "Invalid signature of the receipt\n");
-	  GNUNET_break (0);
-	  GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
-	  return;
-	}
+          GNUNET_CRYPTO_rsa_verify (GNUNET_SIGNATURE_PURPOSE_CHAT_RECEIPT,
+                                    &receipt->purpose,
+                                    &receipt->signature,
+                                    &target->public_key))
+        {
+          GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                      "Invalid signature of the receipt\n");
+          GNUNET_break (0);
+          GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
+          return;
+        }
 #if DEBUG_CHAT_SERVICE
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-		  "Sending receipt to the client which sent the original message\n");
+                  "Sending receipt to the client which sent the original message\n");
 #endif
       crmsg = GNUNET_memdup (receipt, sizeof (struct ConfirmationReceiptMessage));
       crmsg->header.type = htons (GNUNET_MESSAGE_TYPE_CHAT_CONFIRMATION_NOTIFICATION);
       GNUNET_SERVER_notification_context_unicast (nc,
-						  author->client,
-						  &crmsg->header,
-						  GNUNET_NO);
+                                                  author->client,
+                                                  &crmsg->header,
+                                                  GNUNET_NO);
       GNUNET_free (crmsg);
     }
   GNUNET_SERVER_receive_done (client, GNUNET_OK);
@@ -881,8 +881,8 @@
  */
 static size_t
 transmit_leave_notification_to_peer (void *cls,
-				     size_t size,
-				     void *buf)
+                                     size_t size,
+                                     void *buf)
 {
   struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *public_key = cls;
   struct P2PLeaveNotificationMessage *m = buf;
@@ -890,14 +890,14 @@
 
 #if DEBUG_CHAT_SERVICE
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-	      "Transmitting P2P leave notification\n");
+              "Transmitting P2P leave notification\n");
 #endif
   if (buf == NULL)
     {
       /* client disconnected */
 #if DEBUG_CHAT_SERVICE
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-		  "Buffer is NULL, dropping the message\n");
+                  "Buffer is NULL, dropping the message\n");
 #endif
       return 0;
     }
@@ -918,8 +918,8 @@
  */
 static int
 send_leave_noficiation (void *cls,
-			const GNUNET_HashCode *key,
-			void *value) 
+                        const GNUNET_HashCode *key,
+                        void *value) 
 {
   struct ChatClient *entry = cls;
   struct ConnectedPeer *cp = value;
@@ -930,20 +930,20 @@
   GNUNET_PEER_resolve (cp->pid, &pid);
 #if DEBUG_CHAT_SERVICE
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-	      "Sending leave notification to `%s'\n", GNUNET_i2s (&pid));
+              "Sending leave notification to `%s'\n", GNUNET_i2s (&pid));
 #endif
   msg_size = sizeof (struct P2PLeaveNotificationMessage);
   public_key = GNUNET_memdup (&entry->public_key,
-			      sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded));
+                              sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded));
   if (NULL == GNUNET_CORE_notify_transmit_ready (core,
-						 1,
-						 MAX_TRANSMIT_DELAY,
-						 &pid,
-						 msg_size,
-						 &transmit_leave_notification_to_peer,
-						 public_key))
+                                                 1,
+                                                 MAX_TRANSMIT_DELAY,
+                                                 &pid,
+                                                 msg_size,
+                                                 &transmit_leave_notification_to_peer,
+                                                 public_key))
     GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
-		_("Failed to queue a leave notification\n"));
+                _("Failed to queue a leave notification\n"));
   return GNUNET_YES;
 }
 
@@ -957,7 +957,7 @@
  */
 static void
 handle_client_disconnect (void *cls,
-			  struct GNUNET_SERVER_Client *client)
+                          struct GNUNET_SERVER_Client *client)
 {
   struct ChatClient *entry;
   struct ChatClient *pos;
@@ -976,7 +976,7 @@
     {
 #if DEBUG_CHAT_SERVICE
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-		  "No such client. There is nothing to do\n");
+                  "No such client. There is nothing to do\n");
 #endif
       return;
     }
@@ -987,7 +987,7 @@
   entry = client_list_head;
 #if DEBUG_CHAT_SERVICE
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-	      "Notifying local room members that the client has disconnected\n");
+              "Notifying local room members that the client has disconnected\n");
 #endif
   lnmsg.header.size = htons (sizeof (struct LeaveNotificationMessage));
   lnmsg.header.type = htons (GNUNET_MESSAGE_TYPE_CHAT_LEAVE_NOTIFICATION);
@@ -996,22 +996,22 @@
   while (NULL != entry)
     {
       if ((0 == strcmp (pos->room, entry->room)) &&
-	  (NULL != entry->client))
-	{
-	  GNUNET_SERVER_notification_context_unicast (nc,
-						      entry->client,
-						      &lnmsg.header,
-						      GNUNET_NO);
-	}
+          (NULL != entry->client))
+        {
+          GNUNET_SERVER_notification_context_unicast (nc,
+                                                      entry->client,
+                                                      &lnmsg.header,
+                                                      GNUNET_NO);
+        }
       entry = entry->next;
     }
 #if DEBUG_CHAT_SERVICE
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-	      "Broadcasting leave notification to neighbour peers\n");
+              "Broadcasting leave notification to neighbour peers\n");
 #endif
   GNUNET_CONTAINER_multihashmap_iterate (connected_peers,
-					 &send_leave_noficiation,
-					 pos);
+                                         &send_leave_noficiation,
+                                         pos);
   GNUNET_free (pos->room);
   GNUNET_free_non_null (pos->member_info);
   GNUNET_free (pos);
@@ -1030,9 +1030,9 @@
  */
 static int
 handle_p2p_join_notification (void *cls,
-			      const struct GNUNET_PeerIdentity *other,
-			      const struct GNUNET_MessageHeader *message,
-			      const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                              const struct GNUNET_PeerIdentity *other,
+                              const struct GNUNET_MessageHeader *message,
+                              const struct GNUNET_TRANSPORT_ATS_Information *atsi)
 {
   const struct P2PJoinNotificationMessage *p2p_jnmsg;
   char *room_name;
@@ -1059,24 +1059,24 @@
       room_name_len)
     {
       GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-		  "Malformed message: wrong length of the room name\n");
+                  "Malformed message: wrong length of the room name\n");
       GNUNET_break_op (0);
       return GNUNET_SYSERR;
     }
   GNUNET_CRYPTO_hash (&p2p_jnmsg->public_key,
-		      sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
-		      &id);
+                      sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
+                      &id);
   entry = client_list_head;
   while (NULL != entry)
     {
       if (0 == memcmp (&entry->id, &id, sizeof (GNUNET_HashCode)))
-	{
+        {
 #if DEBUG_CHAT_SERVICE
-	  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-		      "The client has already joined. There is nothing to do\n");
+          GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                      "The client has already joined. There is nothing to do\n");
 #endif
-	  return GNUNET_OK;
-	}
+          return GNUNET_OK;
+        }
       entry = entry->next;
     }
   meta_len =
@@ -1104,7 +1104,7 @@
   client_list_head = new_entry;
 #if DEBUG_CHAT_SERVICE
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-	      "Notifying local room members that we have a new client\n");
+              "Notifying local room members that we have a new client\n");
 #endif
   jnmsg = GNUNET_malloc (sizeof (struct JoinNotificationMessage) + meta_len);
   jnmsg->header.type = htons (GNUNET_MESSAGE_TYPE_CHAT_JOIN_NOTIFICATION);
@@ -1117,22 +1117,22 @@
   while (NULL != entry)
     {
       if ((0 == strcmp (room_name, entry->room)) &&
-	  (NULL != entry->client))
-	{
-	  GNUNET_SERVER_notification_context_unicast (nc,
-						      entry->client,
-						      &jnmsg->header,
-						      GNUNET_NO);
-	}
+          (NULL != entry->client))
+        {
+          GNUNET_SERVER_notification_context_unicast (nc,
+                                                      entry->client,
+                                                      &jnmsg->header,
+                                                      GNUNET_NO);
+        }
       entry = entry->next;
     }
 #if DEBUG_CHAT_SERVICE
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-	      "Broadcasting join notification to neighbour peers\n");
+              "Broadcasting join notification to neighbour peers\n");
 #endif
   GNUNET_CONTAINER_multihashmap_iterate (connected_peers,
-					 &send_join_noficiation,
-					 new_entry);
+                                         &send_join_noficiation,
+                                         new_entry);
   GNUNET_free (jnmsg);
   return GNUNET_OK;
 }
@@ -1150,9 +1150,9 @@
  */
 static int
 handle_p2p_leave_notification (void *cls,
-			       const struct GNUNET_PeerIdentity *other,
-			       const struct GNUNET_MessageHeader *message,
-			       const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                               const struct GNUNET_PeerIdentity *other,
+                               const struct GNUNET_MessageHeader *message,
+                               const struct GNUNET_TRANSPORT_ATS_Information *atsi)
 {
   const struct P2PLeaveNotificationMessage *p2p_lnmsg;
   GNUNET_HashCode id;
@@ -1164,14 +1164,14 @@
   GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Got P2P leave notification\n");
   p2p_lnmsg = (const struct P2PLeaveNotificationMessage *) message;
   GNUNET_CRYPTO_hash (&p2p_lnmsg->user,
-		      sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
-		      &id);
+                      sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
+                      &id);
   pos = client_list_head;
   prev = NULL;
   while (NULL != pos)
     {
       if (0 == memcmp (&pos->id, &id, sizeof (GNUNET_HashCode)))
-	break;
+        break;
       prev = pos;
       pos = pos->next;
     }
@@ -1179,7 +1179,7 @@
     {
 #if DEBUG_CHAT_SERVICE
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-		  "No such client. There is nothing to do\n");
+                  "No such client. There is nothing to do\n");
 #endif
       return GNUNET_OK;
     }
@@ -1189,7 +1189,7 @@
     prev->next = pos->next;
 #if DEBUG_CHAT_SERVICE
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-	      "Notifying local room members that the client has gone away\n");
+              "Notifying local room members that the client has gone away\n");
 #endif
   lnmsg.header.size = htons (sizeof (struct LeaveNotificationMessage));
   lnmsg.header.type = htons (GNUNET_MESSAGE_TYPE_CHAT_LEAVE_NOTIFICATION);
@@ -1199,22 +1199,22 @@
   while (NULL != entry)
     {
       if (0 == strcmp (pos->room, entry->room) &&
-	  (NULL != entry->client))
-	{
-	  GNUNET_SERVER_notification_context_unicast (nc,
-						      entry->client,
-						      &lnmsg.header,
-						      GNUNET_NO);
-	}
+          (NULL != entry->client))
+        {
+          GNUNET_SERVER_notification_context_unicast (nc,
+                                                      entry->client,
+                                                      &lnmsg.header,
+                                                      GNUNET_NO);
+        }
       entry = entry->next;
     }
 #if DEBUG_CHAT_SERVICE
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-	      "Broadcasting leave notification to neighbour peers\n");
+              "Broadcasting leave notification to neighbour peers\n");
 #endif
   GNUNET_CONTAINER_multihashmap_iterate (connected_peers,
-					 &send_leave_noficiation,
-					 pos);
+                                         &send_leave_noficiation,
+                                         pos);
   GNUNET_free (pos->room);
   GNUNET_free_non_null (pos->member_info);
   GNUNET_free (pos);
@@ -1234,9 +1234,9 @@
  */
 static int
 handle_p2p_message_notification (void *cls,
-				 const struct GNUNET_PeerIdentity *other,
-				 const struct GNUNET_MessageHeader *message,
-				 const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                                 const struct GNUNET_PeerIdentity *other,
+                                 const struct GNUNET_MessageHeader *message,
+                                 const struct GNUNET_TRANSPORT_ATS_Information *atsi)
 {
   const struct P2PReceiveNotificationMessage *p2p_rnmsg;
   struct P2PReceiveNotificationMessage *my_p2p_rnmsg;
@@ -1267,21 +1267,21 @@
     {
       room_name_len = ntohs (p2p_rnmsg->room_name_len);
       if (msg_len <= room_name_len)
-	{
-	  GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-		      "Malformed message: wrong length of the room name\n");
-	  GNUNET_break_op (0);
-	  return GNUNET_SYSERR;
-	}
+        {
+          GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                      "Malformed message: wrong length of the room name\n");
+          GNUNET_break_op (0);
+          return GNUNET_SYSERR;
+        }
       msg_len -= room_name_len;
       if (lookup_anonymous_message (p2p_rnmsg))
-	{
+        {
 #if DEBUG_CHAT_SERVICE
-	  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-		      "This anonymous message has already been handled.");
+          GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                      "This anonymous message has already been handled.");
 #endif
-	  return GNUNET_OK;
-	}
+          return GNUNET_OK;
+        }
       remember_anonymous_message (p2p_rnmsg);
       room_name = GNUNET_malloc (room_name_len + 1);
       memcpy (room_name, (char *) &p2p_rnmsg[1], room_name_len);
@@ -1292,28 +1292,28 @@
     {
   sender = client_list_head;
   while ((NULL != sender) &&
-	 (0 != memcmp (&sender->id,
-		       &p2p_rnmsg->sender,
-		       sizeof (GNUNET_HashCode))))
+         (0 != memcmp (&sender->id,
+                       &p2p_rnmsg->sender,
+                       sizeof (GNUNET_HashCode))))
     sender = sender->next;
   if (NULL == sender)
     {
-	  /* not an error since the sender may have left before we got the
-	     message */
+          /* not an error since the sender may have left before we got the
+             message */
 #if DEBUG_CHAT_SERVICE
-	  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-		  "Unknown source. Rejecting the message\n");
+          GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                  "Unknown source. Rejecting the message\n");
 #endif
-	  return GNUNET_OK;
+          return GNUNET_OK;
     }
   if (sender->msg_sequence_number >= ntohl (p2p_rnmsg->sequence_number))
     {
 #if DEBUG_CHAT_SERVICE
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-		  "This message has already been handled."
-		  " Sequence numbers (msg/sender): %u/%u\n",
-		      ntohl (p2p_rnmsg->sequence_number),
-		      sender->msg_sequence_number);
+                  "This message has already been handled."
+                  " Sequence numbers (msg/sender): %u/%u\n",
+                      ntohl (p2p_rnmsg->sequence_number),
+                      sender->msg_sequence_number);
 #endif
       return GNUNET_OK;
     }
@@ -1324,53 +1324,53 @@
 
 #if DEBUG_CHAT_SERVICE
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-	      "Sending message to local room members\n");
+              "Sending message to local room members\n");
 #endif
   rnmsg = GNUNET_malloc (sizeof (struct ReceiveNotificationMessage) + msg_len);
   rnmsg->header.size = htons (sizeof (struct ReceiveNotificationMessage) +
-			      msg_len);
+                              msg_len);
   rnmsg->header.type = htons (GNUNET_MESSAGE_TYPE_CHAT_MESSAGE_NOTIFICATION);
   rnmsg->msg_options = p2p_rnmsg->msg_options;
   rnmsg->sequence_number = p2p_rnmsg->sequence_number;
   rnmsg->timestamp = p2p_rnmsg->timestamp;
   is_priv = (0 != memcmp (&all_zeros,
-			   &p2p_rnmsg->target, sizeof (GNUNET_HashCode)));
+                           &p2p_rnmsg->target, sizeof (GNUNET_HashCode)));
   if (is_priv)
     memcpy (&rnmsg->encrypted_key,
-	    &p2p_rnmsg->encrypted_key,
-	    sizeof (struct GNUNET_CRYPTO_RsaEncryptedData));
+            &p2p_rnmsg->encrypted_key,
+            sizeof (struct GNUNET_CRYPTO_RsaEncryptedData));
   rnmsg->sender = p2p_rnmsg->sender;
   memcpy (&rnmsg[1], text, msg_len);
   pos = client_list_head;
   while (NULL != pos)
     {
       if ((0 == strcmp (room_name, pos->room)) &&
-	  (NULL != pos->client))
-	{
-	  if (((!is_priv) ||
-	       (0 == memcmp (&p2p_rnmsg->target,
-			     &pos->id,
-			     sizeof (GNUNET_HashCode)))) &&
-	      (0 == (ntohl (p2p_rnmsg->msg_options) & (~pos->msg_options))))
-	    {
-	      GNUNET_SERVER_notification_context_unicast (nc,
-							  pos->client,
-							  &rnmsg->header,
-							  GNUNET_NO);
-	    }
-	}
+          (NULL != pos->client))
+        {
+          if (((!is_priv) ||
+               (0 == memcmp (&p2p_rnmsg->target,
+                             &pos->id,
+                             sizeof (GNUNET_HashCode)))) &&
+              (0 == (ntohl (p2p_rnmsg->msg_options) & (~pos->msg_options))))
+            {
+              GNUNET_SERVER_notification_context_unicast (nc,
+                                                          pos->client,
+                                                          &rnmsg->header,
+                                                          GNUNET_NO);
+            }
+        }
       pos = pos->next;
     }
   if (is_anon)
     GNUNET_free (room_name);
 #if DEBUG_CHAT_SERVICE
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-	      "Broadcasting message notification to neighbour peers\n");
+              "Broadcasting message notification to neighbour peers\n");
 #endif
   my_p2p_rnmsg = GNUNET_memdup (p2p_rnmsg, ntohs (p2p_rnmsg->header.size));
   GNUNET_CONTAINER_multihashmap_iterate (connected_peers,
-					 &send_message_noficiation,
-					 my_p2p_rnmsg);
+                                         &send_message_noficiation,
+                                         my_p2p_rnmsg);
   GNUNET_free (rnmsg);
   return GNUNET_OK;
 }
@@ -1388,9 +1388,9 @@
  */
 static int
 handle_p2p_sync_request (void *cls,
-			 const struct GNUNET_PeerIdentity *other,
-			 const struct GNUNET_MessageHeader *message,
-			 const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                         const struct GNUNET_PeerIdentity *other,
+                         const struct GNUNET_MessageHeader *message,
+                         const struct GNUNET_TRANSPORT_ATS_Information *atsi)
 {
   struct ChatClient *entry;
   struct GNUNET_CORE_TransmitHandle *th;
@@ -1399,21 +1399,21 @@
   GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Got P2P sync request\n");
 #if DEBUG_CHAT_SERVICE
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-	      "Notifying the requester of all known clients\n");
+              "Notifying the requester of all known clients\n");
 #endif
   entry = client_list_head;
   while (NULL != entry)
     {
       msg_size = sizeof (struct P2PJoinNotificationMessage) +
-	strlen (entry->room) + 
-	entry->meta_len;
+        strlen (entry->room) + 
+        entry->meta_len;
       th = GNUNET_CORE_notify_transmit_ready (core,
-					      1,
-					      MAX_TRANSMIT_DELAY,
-					      other,
-					      msg_size,
-					      &transmit_join_notification_to_peer,
-					      entry);
+                                              1,
+                                              MAX_TRANSMIT_DELAY,
+                                              other,
+                                              msg_size,
+                                              &transmit_join_notification_to_peer,
+                                              entry);
       GNUNET_assert (NULL != th);
       entry = entry->next;
     }
@@ -1433,9 +1433,9 @@
  */
 static int
 handle_p2p_confirmation_receipt (void *cls,
-				 const struct GNUNET_PeerIdentity *other,
-				 const struct GNUNET_MessageHeader *message,
-				 const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                                 const struct GNUNET_PeerIdentity *other,
+                                 const struct GNUNET_MessageHeader *message,
+                                 const struct GNUNET_TRANSPORT_ATS_Information *atsi)
 {
   const struct P2PConfirmationReceiptMessage *p2p_crmsg;
   struct P2PConfirmationReceiptMessage *my_p2p_crmsg;
@@ -1447,14 +1447,14 @@
   p2p_crmsg = (const struct P2PConfirmationReceiptMessage *) message;
   target = client_list_head;
   while ((NULL != target) &&
-	 (0 != memcmp (&target->id,
-		       &p2p_crmsg->target,
-		       sizeof (GNUNET_HashCode))))
+         (0 != memcmp (&target->id,
+                       &p2p_crmsg->target,
+                       sizeof (GNUNET_HashCode))))
     target = target->next;
   if (NULL == target)
     {
       GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-		  "Unknown source of the receipt. Rejecting the message\n");
+                  "Unknown source of the receipt. Rejecting the message\n");
       GNUNET_break_op (0);
       return GNUNET_SYSERR;
     }
@@ -1462,23 +1462,23 @@
     {
 #if DEBUG_CHAT_SERVICE
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-		  "This receipt has already been handled."
-		  " Sequence numbers (msg/sender): %u/%u\n",
-		  ntohl (p2p_crmsg->sequence_number), target->rcpt_sequence_number);
+                  "This receipt has already been handled."
+                  " Sequence numbers (msg/sender): %u/%u\n",
+                  ntohl (p2p_crmsg->sequence_number), target->rcpt_sequence_number);
 #endif
       return GNUNET_OK;
     }
   target->rcpt_sequence_number = ntohl (p2p_crmsg->sequence_number);
   author = client_list_head;
   while ((NULL != author) &&
-	 (0 != memcmp (&author->id,
-		       &p2p_crmsg->author,
-		       sizeof (GNUNET_HashCode))))
+         (0 != memcmp (&author->id,
+                       &p2p_crmsg->author,
+                       sizeof (GNUNET_HashCode))))
     author = author->next;
   if (NULL == author)
     {
       GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-		  "Unknown addressee. Rejecting the receipt\n");
+                  "Unknown addressee. Rejecting the receipt\n");
       GNUNET_break_op (0);
       return GNUNET_SYSERR;
     }
@@ -1487,21 +1487,21 @@
     {
 #if DEBUG_CHAT_SERVICE
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-		  "The author of the original message is not a local client."
-		  " Broadcasting receipt to neighbour peers\n");
+                  "The author of the original message is not a local client."
+                  " Broadcasting receipt to neighbour peers\n");
 #endif
       my_p2p_crmsg = GNUNET_memdup (p2p_crmsg, sizeof (struct P2PConfirmationReceiptMessage));
       GNUNET_CONTAINER_multihashmap_iterate (connected_peers,
-					     &send_confirmation_receipt,
-					     my_p2p_crmsg);
+                                             &send_confirmation_receipt,
+                                             my_p2p_crmsg);
       GNUNET_free (my_p2p_crmsg);
     }
   else
     {
 #if DEBUG_CHAT_SERVICE
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-		  "The author of the original message is a local client."
-		  " Verifying signature of the receipt\n");
+                  "The author of the original message is a local client."
+                  " Verifying signature of the receipt\n");
 #endif
       crmsg = GNUNET_malloc (sizeof (struct ConfirmationReceiptMessage));
       crmsg->header.size = htons (sizeof (struct ConfirmationReceiptMessage));
@@ -1515,25 +1515,25 @@
       crmsg->author = p2p_crmsg->author;
       crmsg->content = p2p_crmsg->content;
       if (GNUNET_OK !=
-	  GNUNET_CRYPTO_rsa_verify (GNUNET_SIGNATURE_PURPOSE_CHAT_RECEIPT,
-				    &crmsg->purpose,
-				    &crmsg->signature,
-				    &target->public_key))
-	{
-	  GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-		      "Invalid signature of the receipt\n");
-	  GNUNET_break_op (0);
-	  return GNUNET_SYSERR;
-	}
+          GNUNET_CRYPTO_rsa_verify (GNUNET_SIGNATURE_PURPOSE_CHAT_RECEIPT,
+                                    &crmsg->purpose,
+                                    &crmsg->signature,
+                                    &target->public_key))
+        {
+          GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                      "Invalid signature of the receipt\n");
+          GNUNET_break_op (0);
+          return GNUNET_SYSERR;
+        }
 #if DEBUG_CHAT_SERVICE
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-		  "The author of the original message is a local client."
-		  " Sending receipt to the client\n");
+                  "The author of the original message is a local client."
+                  " Sending receipt to the client\n");
 #endif
       GNUNET_SERVER_notification_context_unicast (nc,
-						  author->client,
-						  &crmsg->header,
-						  GNUNET_NO);
+                                                  author->client,
+                                                  &crmsg->header,
+                                                  GNUNET_NO);
       GNUNET_free (crmsg);
     }
   return GNUNET_OK;
@@ -1550,8 +1550,8 @@
  */
 static size_t
 transmit_sync_request_to_peer (void *cls,
-			       size_t size,
-			       void *buf)
+                               size_t size,
+                               void *buf)
 {
   struct GNUNET_MessageHeader *m = buf;
   size_t msg_size;
@@ -1578,8 +1578,8 @@
  */
 static void 
 peer_connect_handler (void *cls,
-		      const struct GNUNET_PeerIdentity *peer,
-		      const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                      const struct GNUNET_PeerIdentity *peer,
+                      const struct GNUNET_TRANSPORT_ATS_Information *atsi)
 {
   struct ConnectedPeer *cp;
   struct GNUNET_CORE_TransmitHandle *th;
@@ -1587,17 +1587,17 @@
   if (0 == memcmp (peer, me, sizeof (struct GNUNET_PeerIdentity)))
     return;
   GNUNET_log (GNUNET_ERROR_TYPE_INFO,
-	      "Peer connected: %s\n", GNUNET_i2s (peer));
+              "Peer connected: %s\n", GNUNET_i2s (peer));
   th = GNUNET_CORE_notify_transmit_ready (core,
-					  1,
-					  MAX_TRANSMIT_DELAY,
-					  peer,
-					  sizeof (struct GNUNET_MessageHeader),
-					  &transmit_sync_request_to_peer,
-					  NULL);
+                                          1,
+                                          MAX_TRANSMIT_DELAY,
+                                          peer,
+                                          sizeof (struct GNUNET_MessageHeader),
+                                          &transmit_sync_request_to_peer,
+                                          NULL);
   GNUNET_assert (NULL != th);
   cp = GNUNET_CONTAINER_multihashmap_get (connected_peers,
-					  &peer->hashPubKey);
+                                          &peer->hashPubKey);
   if (NULL != cp)
     {
       GNUNET_break (0);
@@ -1606,10 +1606,10 @@
   cp = GNUNET_malloc (sizeof (struct ConnectedPeer));
   cp->pid = GNUNET_PEER_intern (peer);
   GNUNET_break (GNUNET_OK ==
-		GNUNET_CONTAINER_multihashmap_put (connected_peers,
-						   &peer->hashPubKey,
-						   cp,
-						   GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY));
+                GNUNET_CONTAINER_multihashmap_put (connected_peers,
+                                                   &peer->hashPubKey,
+                                                   cp,
+                                                   GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY));
 }
 
 
@@ -1623,20 +1623,20 @@
  */
 static int 
 clean_peer (void *cls,
-	    const GNUNET_HashCode * key,
-	    void *value)
+            const GNUNET_HashCode * key,
+            void *value)
 {
   struct ConnectedPeer *cp;
   const struct GNUNET_PeerIdentity *peer = (const struct GNUNET_PeerIdentity *) key;
 
   cp = GNUNET_CONTAINER_multihashmap_get (connected_peers,
-					  &peer->hashPubKey);
+                                          &peer->hashPubKey);
   if (cp == NULL)
     return GNUNET_YES;
   GNUNET_break (GNUNET_YES ==
-		GNUNET_CONTAINER_multihashmap_remove (connected_peers,
-						      &peer->hashPubKey,
-						      cp));
+                GNUNET_CONTAINER_multihashmap_remove (connected_peers,
+                                                      &peer->hashPubKey,
+                                                      cp));
   GNUNET_PEER_change_rc (cp->pid, -1);
   GNUNET_free (cp);
   return GNUNET_YES;
@@ -1651,13 +1651,13 @@
  */
 static void
 peer_disconnect_handler (void *cls,
-			 const struct GNUNET_PeerIdentity *peer)
+                         const struct GNUNET_PeerIdentity *peer)
 {
 
   if (0 == memcmp (peer, me, sizeof (struct GNUNET_PeerIdentity)))
     return;
   GNUNET_log (GNUNET_ERROR_TYPE_INFO,
-	      "Peer disconnected: %s\n", GNUNET_i2s (peer));
+              "Peer disconnected: %s\n", GNUNET_i2s (peer));
   clean_peer (NULL, (const GNUNET_HashCode *) peer, NULL);
 }
 
@@ -1670,7 +1670,7 @@
  */
 static void
 cleanup_task (void *cls,
-	      const struct GNUNET_SCHEDULER_TaskContext *tc)
+              const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
   struct AnonymousMessage *next_msg;
   struct ChatClient *next_client;
@@ -1701,8 +1701,8 @@
       anonymous_list_head = next_msg;
     }
   GNUNET_CONTAINER_multihashmap_iterate (connected_peers,
-					 &clean_peer,
-					 NULL);
+                                         &clean_peer,
+                                         NULL);
   GNUNET_CONTAINER_multihashmap_destroy (connected_peers);
   connected_peers = NULL;
 }
@@ -1718,9 +1718,9 @@
  */
 static void
 core_init (void *cls,
-	   struct GNUNET_CORE_Handle *server,
-	   const struct GNUNET_PeerIdentity *my_identity,
-	   const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *publicKey)
+           struct GNUNET_CORE_Handle *server,
+           const struct GNUNET_PeerIdentity *my_identity,
+           const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *publicKey)
 {
   GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Core initialized\n");
   me = my_identity;
@@ -1742,59 +1742,59 @@
   static const struct GNUNET_SERVER_MessageHandler handlers[] =
     {
       { &handle_join_request, NULL,
-	GNUNET_MESSAGE_TYPE_CHAT_JOIN_REQUEST, 0 },
+        GNUNET_MESSAGE_TYPE_CHAT_JOIN_REQUEST, 0 },
       { &handle_transmit_request, NULL,
-	GNUNET_MESSAGE_TYPE_CHAT_TRANSMIT_REQUEST, 0 },
+        GNUNET_MESSAGE_TYPE_CHAT_TRANSMIT_REQUEST, 0 },
       { &handle_acknowledge_request, NULL,
-	GNUNET_MESSAGE_TYPE_CHAT_CONFIRMATION_RECEIPT,
-	sizeof (struct ConfirmationReceiptMessage) },
+        GNUNET_MESSAGE_TYPE_CHAT_CONFIRMATION_RECEIPT,
+        sizeof (struct ConfirmationReceiptMessage) },
       { NULL, NULL, 0, 0 }
     };
   static const struct GNUNET_CORE_MessageHandler p2p_handlers[] =
     {
       { &handle_p2p_join_notification,
-	GNUNET_MESSAGE_TYPE_CHAT_P2P_JOIN_NOTIFICATION, 0 },
+        GNUNET_MESSAGE_TYPE_CHAT_P2P_JOIN_NOTIFICATION, 0 },
       { &handle_p2p_leave_notification,
-	GNUNET_MESSAGE_TYPE_CHAT_P2P_LEAVE_NOTIFICATION,
-	sizeof (struct P2PLeaveNotificationMessage) },
+        GNUNET_MESSAGE_TYPE_CHAT_P2P_LEAVE_NOTIFICATION,
+        sizeof (struct P2PLeaveNotificationMessage) },
       { &handle_p2p_message_notification,
-	GNUNET_MESSAGE_TYPE_CHAT_P2P_MESSAGE_NOTIFICATION, 0 },
+        GNUNET_MESSAGE_TYPE_CHAT_P2P_MESSAGE_NOTIFICATION, 0 },
       { &handle_p2p_sync_request,
-	GNUNET_MESSAGE_TYPE_CHAT_P2P_SYNC_REQUEST,
-	sizeof (struct GNUNET_MessageHeader) },
+        GNUNET_MESSAGE_TYPE_CHAT_P2P_SYNC_REQUEST,
+        sizeof (struct GNUNET_MessageHeader) },
       { &handle_p2p_confirmation_receipt,
-	GNUNET_MESSAGE_TYPE_CHAT_P2P_CONFIRMATION_RECEIPT,
-	sizeof (struct P2PConfirmationReceiptMessage) },
+        GNUNET_MESSAGE_TYPE_CHAT_P2P_CONFIRMATION_RECEIPT,
+        sizeof (struct P2PConfirmationReceiptMessage) },
       { NULL, 0, 0 }
     };
 
   GNUNET_log_setup ("gnunet-service-chat",
 #if DEBUG_CHAT_SERVICE
-		    "DEBUG",
+                    "DEBUG",
 #else
-		    "WARNING",
+                    "WARNING",
 #endif
-		    NULL);
+                    NULL);
   cfg = c;
   nc = GNUNET_SERVER_notification_context_create (server, 16);
   connected_peers = GNUNET_CONTAINER_multihashmap_create (EXPECTED_NEIGHBOUR_COUNT);
   GNUNET_SERVER_add_handlers (server, handlers);
   core = GNUNET_CORE_connect (cfg,
-			      QUEUE_SIZE,
-			      NULL,
-			      &core_init,
-			      &peer_connect_handler,
-			      &peer_disconnect_handler,
-			      NULL,
-			      NULL, GNUNET_NO,
-			      NULL, GNUNET_NO,
-			      p2p_handlers);
+                              QUEUE_SIZE,
+                              NULL,
+                              &core_init,
+                              &peer_connect_handler,
+                              &peer_disconnect_handler,
+                              NULL,
+                              NULL, GNUNET_NO,
+                              NULL, GNUNET_NO,
+                              p2p_handlers);
   GNUNET_SERVER_disconnect_notify (server, 
-				   &handle_client_disconnect,
-				   NULL);
+                                   &handle_client_disconnect,
+                                   NULL);
   GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL,
-				&cleanup_task,
-				NULL);
+                                &cleanup_task,
+                                NULL);
 }
 
 
@@ -1809,11 +1809,11 @@
 main (int argc, char *const *argv)
 {
   return (GNUNET_OK ==
-	  GNUNET_SERVICE_run (argc,
-			      argv,
-			      "chat",
-			      GNUNET_SERVICE_OPTION_NONE,
-			      &run, NULL)) ? 0 : 1;
+          GNUNET_SERVICE_run (argc,
+                              argv,
+                              "chat",
+                              GNUNET_SERVICE_OPTION_NONE,
+                              &run, NULL)) ? 0 : 1;
 }
 
 /* end of gnunet-service-chat.c */
diff -ur gnunet/src/chat/test_chat.c gnunet.notabs/src/chat/test_chat.c
--- gnunet/src/chat/test_chat.c	2011-02-28 23:05:58.356669159 +0300
+++ gnunet.notabs/src/chat/test_chat.c	2011-03-03 06:51:52.490002490 +0300
@@ -148,7 +148,7 @@
 
 static void
 abort_test (void *cls,
-	    const struct GNUNET_SCHEDULER_TaskContext *tc)
+            const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
   if (alice_room != NULL)
     {
@@ -166,7 +166,7 @@
 
 static void
 timeout_kill (void *cls,
-	      const struct GNUNET_SCHEDULER_TaskContext *tc)
+              const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
 #if VERBOSE
   printf ("Timed out, stopping the test.\n");
@@ -178,7 +178,7 @@
       wait_task = GNUNET_SCHEDULER_NO_TASK;
     }
   GNUNET_SCHEDULER_add_continuation (&abort_test, NULL,
-				     GNUNET_SCHEDULER_REASON_PREREQ_DONE);
+                                     GNUNET_SCHEDULER_REASON_PREREQ_DONE);
 }
 
 
@@ -198,9 +198,9 @@
 
 static int
 member_list_cb (void *cls,
-		const struct GNUNET_CONTAINER_MetaData *member_info,
-		const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *member_id,
-		enum GNUNET_CHAT_MsgOptions options)
+                const struct GNUNET_CONTAINER_MetaData *member_info,
+                const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *member_id,
+                enum GNUNET_CHAT_MsgOptions options)
 {
   struct Wanted *want = cls;
   GNUNET_HashCode sender;
@@ -210,24 +210,24 @@
            want->me,
            member_info == NULL ? NULL
            : GNUNET_CONTAINER_meta_data_get_by_type (member_info,
-						     EXTRACTOR_METATYPE_TITLE),
-	   member_info == NULL ? "left" : "joined");
+                                                     EXTRACTOR_METATYPE_TITLE),
+           member_info == NULL ? "left" : "joined");
 #endif
   GNUNET_CRYPTO_hash (member_id,
-		      sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
-		      &sender);
+                      sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
+                      &sender);
   if ((0 == memcmp (&sender, want->sender,
-		    sizeof (GNUNET_HashCode))) &&
+                    sizeof (GNUNET_HashCode))) &&
       (((member_info == NULL) &&
-	(want->meta == NULL)) ||
+        (want->meta == NULL)) ||
        ((member_info != NULL) &&
-	(want->meta != NULL) &&
-	(GNUNET_CONTAINER_meta_data_test_equal (member_info,
-						want->meta)))) &&
+        (want->meta != NULL) &&
+        (GNUNET_CONTAINER_meta_data_test_equal (member_info,
+                                                want->meta)))) &&
       (options == want->opt))
     {
       if (NULL != want->next_task)
-	GNUNET_SCHEDULER_add_now (want->next_task, want->next_task_cls);
+        GNUNET_SCHEDULER_add_now (want->next_task, want->next_task_cls);
     }
   else
     {
@@ -241,28 +241,28 @@
 
 static int
 receive_cb (void *cls,
-	    struct GNUNET_CHAT_Room *room,
-	    const GNUNET_HashCode *sender,
-	    const struct GNUNET_CONTAINER_MetaData *meta,
-	    const char *message,
-	    struct GNUNET_TIME_Absolute timestamp,
-	    enum GNUNET_CHAT_MsgOptions options)
+            struct GNUNET_CHAT_Room *room,
+            const GNUNET_HashCode *sender,
+            const struct GNUNET_CONTAINER_MetaData *meta,
+            const char *message,
+            struct GNUNET_TIME_Absolute timestamp,
+            enum GNUNET_CHAT_MsgOptions options)
 {
   struct Wanted *want = cls;
 
 #if VERBOSE
   printf ("%s - told that %s said %s\n",
-	  want->me,
-	  meta == NULL ? NULL
-	  : GNUNET_CONTAINER_meta_data_get_by_type (meta,
-						    EXTRACTOR_METATYPE_TITLE),
-	  message);
+          want->me,
+          meta == NULL ? NULL
+          : GNUNET_CONTAINER_meta_data_get_by_type (meta,
+                                                    EXTRACTOR_METATYPE_TITLE),
+          message);
 #endif
   if ((0 == strcmp (message, want->msg)) &&
       (((sender == NULL) && (want->sender == NULL)) ||
        ((sender != NULL) && (want->sender != NULL) &&
-	(0 == memcmp (sender, want->sender,
-		      sizeof (GNUNET_HashCode))))) &&
+        (0 == memcmp (sender, want->sender,
+                      sizeof (GNUNET_HashCode))))) &&
       (GNUNET_CONTAINER_meta_data_test_equal (meta, want->meta)) &&
       (options == want->opt) &&
       /* Not == since the library sets the actual timestamp, so it may be
@@ -271,7 +271,7 @@
       (timestamp.abs_value >= want->timestamp.abs_value))
     {
       if (NULL != want->next_task)
-	GNUNET_SCHEDULER_add_now (want->next_task, want->next_task_cls);
+        GNUNET_SCHEDULER_add_now (want->next_task, want->next_task_cls);
     }
   else
     {
@@ -285,27 +285,27 @@
 
 static int
 confirmation_cb (void *cls,
-		 struct GNUNET_CHAT_Room *room,
-		 uint32_t orig_seq_number,
-		 struct GNUNET_TIME_Absolute timestamp,
-		 const GNUNET_HashCode *receiver)
+                 struct GNUNET_CHAT_Room *room,
+                 uint32_t orig_seq_number,
+                 struct GNUNET_TIME_Absolute timestamp,
+                 const GNUNET_HashCode *receiver)
 {
   struct Wanted *want = cls;
 
 #if VERBOSE
   printf ("%s - told that %s acknowledged message #%d\n",
-	  want->me,
-	  GNUNET_CONTAINER_meta_data_get_by_type (want->meta,
-						  EXTRACTOR_METATYPE_TITLE),
-	  orig_seq_number);
+          want->me,
+          GNUNET_CONTAINER_meta_data_get_by_type (want->meta,
+                                                  EXTRACTOR_METATYPE_TITLE),
+          orig_seq_number);
 #endif
   if ((0 == memcmp (receiver, want->sender,
-		    sizeof (GNUNET_HashCode))) &&
+                    sizeof (GNUNET_HashCode))) &&
       (orig_seq_number == want->sequence_number) &&
       (timestamp.abs_value >= want->timestamp.abs_value))
     {
       if (NULL != want->next_task)
-	GNUNET_SCHEDULER_add_now (want->next_task, want->next_task_cls);
+        GNUNET_SCHEDULER_add_now (want->next_task, want->next_task_cls);
     }
   else
     {
@@ -319,7 +319,7 @@
 
 static void
 wait_until_ready (void *cls,
-		  const struct GNUNET_SCHEDULER_TaskContext *tc)
+                  const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
   GNUNET_SCHEDULER_Task task = cls;
 
@@ -334,15 +334,15 @@
   else
     wait_task =
       GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS,
-								   50),
-				    &wait_until_ready,
-				    task);
+                                                                   50),
+                                    &wait_until_ready,
+                                    task);
 }
 
 
 static void
 disconnect_alice (void *cls,
-		  const struct GNUNET_SCHEDULER_TaskContext *tc)
+                  const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
 #if VERBOSE
   printf ("Alice is leaving.\n");
@@ -358,7 +358,7 @@
 
 static void
 disconnect_bob (void *cls,
-		const struct GNUNET_SCHEDULER_TaskContext *tc)
+                const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
 #if VERBOSE
   printf ("Bod is leaving.\n");
@@ -376,7 +376,7 @@
 
 static void
 set_ready (void *cls,
-	   const struct GNUNET_SCHEDULER_TaskContext *tc)
+           const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
   is_ready = GNUNET_YES;
 }
@@ -384,7 +384,7 @@
 
 static void
 send_to_alice (void *cls,
-	       const struct GNUNET_SCHEDULER_TaskContext *tc)
+               const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
 #if VERBOSE
   printf ("Bob says 'Hi!'\n");
@@ -398,16 +398,16 @@
   alice_wanted.next_task = &disconnect_bob;
   alice_wanted.next_task_cls = NULL;
   GNUNET_CHAT_send_message (bob_room,
-			    "Hi Alice!",
-			    GNUNET_CHAT_MSG_OPTION_NONE,
-			    NULL,
-			    NULL);
+                            "Hi Alice!",
+                            GNUNET_CHAT_MSG_OPTION_NONE,
+                            NULL,
+                            NULL);
 }
 
 
 static void
 send_to_bob (void *cls,
-	     const struct GNUNET_SCHEDULER_TaskContext *tc)
+             const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
   enum GNUNET_CHAT_MsgOptions options;
   uint32_t *seq = NULL;
@@ -459,7 +459,7 @@
 
 static void
 prepare_for_alice_task (void *cls,
-			const struct GNUNET_SCHEDULER_TaskContext *tc)
+                        const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
   bob_wanted.meta = alice_meta;
   bob_wanted.sender = &alice;
@@ -472,7 +472,7 @@
 
 static void
 join_bob_task (void *cls,
-	       const struct GNUNET_SCHEDULER_TaskContext *tc)
+               const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
 #if VERBOSE
   printf ("Bob joining\n");
@@ -488,12 +488,12 @@
   is_ready = GNUNET_NO;
   bob_room =
     GNUNET_CHAT_join_room (is_p2p ? p2.cfg : p1.cfg, "bob", bob_meta,
-			   "test", -1,
-			   &join_cb, &bob_wanted,
-			   &receive_cb, &bob_wanted,
-			   &member_list_cb, &bob_wanted,
-			   &confirmation_cb, &bob_wanted,
-			   &bob);
+                           "test", -1,
+                           &join_cb, &bob_wanted,
+                           &receive_cb, &bob_wanted,
+                           &member_list_cb, &bob_wanted,
+                           &confirmation_cb, &bob_wanted,
+                           &bob);
   if (NULL == bob_room)
     {
       GNUNET_SCHEDULER_cancel (kill_task);
@@ -507,7 +507,7 @@
 
 static void
 join_alice_task (void *cls,
-		 const struct GNUNET_SCHEDULER_TaskContext *tc)
+                 const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
 #if VERBOSE
   printf ("Alice joining\n");
@@ -516,12 +516,12 @@
   alice_wanted.next_task_cls = NULL;
   alice_room =
     GNUNET_CHAT_join_room (p1.cfg, "alice", alice_meta,
-			   "test", -1,
-			   &join_cb, &alice_wanted,
-			   &receive_cb, &alice_wanted,
-			   &member_list_cb, &alice_wanted,
-			   &confirmation_cb, &alice_wanted,
-			   &alice);
+                           "test", -1,
+                           &join_cb, &alice_wanted,
+                           &receive_cb, &alice_wanted,
+                           &member_list_cb, &alice_wanted,
+                           &confirmation_cb, &alice_wanted,
+                           &alice);
   if (NULL == alice_room)
     {
       GNUNET_SCHEDULER_cancel (kill_task);
@@ -551,23 +551,23 @@
   bob_wanted.me = "Bob";
   alice_meta = GNUNET_CONTAINER_meta_data_create ();
   GNUNET_CONTAINER_meta_data_insert (alice_meta,
-				     "<gnunet>",
-				     EXTRACTOR_METATYPE_TITLE,
-				     EXTRACTOR_METAFORMAT_UTF8,
-				     "text/plain",
-				     "Alice",
-				     strlen("Alice")+1);
+                                     "<gnunet>",
+                                     EXTRACTOR_METATYPE_TITLE,
+                                     EXTRACTOR_METAFORMAT_UTF8,
+                                     "text/plain",
+                                     "Alice",
+                                     strlen("Alice")+1);
   bob_meta = GNUNET_CONTAINER_meta_data_create ();
   GNUNET_CONTAINER_meta_data_insert (bob_meta,
-				     "<gnunet>",
-				     EXTRACTOR_METATYPE_TITLE,
-				     EXTRACTOR_METAFORMAT_UTF8,
-				     "text/plain",
-				     "Bob",
-				     strlen("Bob")+1);
+                                     "<gnunet>",
+                                     EXTRACTOR_METATYPE_TITLE,
+                                     EXTRACTOR_METAFORMAT_UTF8,
+                                     "text/plain",
+                                     "Bob",
+                                     strlen("Bob")+1);
   kill_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT,
-					    &timeout_kill,
-					    NULL);
+                                            &timeout_kill,
+                                            NULL);
   GNUNET_SCHEDULER_add_now (&join_alice_task, NULL);
 }
 
@@ -590,11 +590,11 @@
 
   GNUNET_log_setup ("test_chat", 
 #if VERBOSE
-		    "DEBUG",
+                    "DEBUG",
 #else
-		    "WARNING",
+                    "WARNING",
 #endif
-		    NULL);
+                    NULL);
   if (strstr(argv[0], "p2p") != NULL)
     {
       is_p2p = GNUNET_YES;
@@ -613,7 +613,7 @@
     }
   GNUNET_PROGRAM_run ((sizeof (argvx) / sizeof (char *)) - 1,
                       argvx, "test-chat",
-		      "nohelp", options, &run, NULL);
+                      "nohelp", options, &run, NULL);
   stop_arm (&p1);
   GNUNET_CONTAINER_meta_data_destroy (alice_meta);
   GNUNET_CONTAINER_meta_data_destroy (bob_meta);
diff -ur gnunet/src/chat/test_chat_private.c gnunet.notabs/src/chat/test_chat_private.c
--- gnunet/src/chat/test_chat_private.c	2011-02-28 23:05:58.356669159 +0300
+++ gnunet.notabs/src/chat/test_chat_private.c	2011-03-03 06:52:09.930002490 +0300
@@ -162,7 +162,7 @@
 
 static void
 abort_test (void *cls,
-	    const struct GNUNET_SCHEDULER_TaskContext *tc)
+            const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
   if (alice_room != NULL)
     {
@@ -185,7 +185,7 @@
 
 static void
 timeout_kill (void *cls,
-	      const struct GNUNET_SCHEDULER_TaskContext *tc)
+              const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
 #if VERBOSE
   printf ("Timed out, stopping the test.\n");
@@ -197,7 +197,7 @@
       wait_task = GNUNET_SCHEDULER_NO_TASK;
     }
   GNUNET_SCHEDULER_add_continuation (&abort_test, NULL,
-				     GNUNET_SCHEDULER_REASON_PREREQ_DONE);
+                                     GNUNET_SCHEDULER_REASON_PREREQ_DONE);
 }
 
 
@@ -217,9 +217,9 @@
 
 static int
 member_list_cb (void *cls,
-		const struct GNUNET_CONTAINER_MetaData *member_info,
-		const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *member_id,
-		enum GNUNET_CHAT_MsgOptions options)
+                const struct GNUNET_CONTAINER_MetaData *member_info,
+                const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *member_id,
+                enum GNUNET_CHAT_MsgOptions options)
 {
   struct Wanted *want = cls;
   GNUNET_HashCode sender;
@@ -229,46 +229,46 @@
            want->me,
            member_info == NULL ? NULL
            : GNUNET_CONTAINER_meta_data_get_by_type (member_info,
-						     EXTRACTOR_METATYPE_TITLE),
-	   member_info == NULL ? "left" : "joined");
+                                                     EXTRACTOR_METATYPE_TITLE),
+           member_info == NULL ? "left" : "joined");
 #endif
   GNUNET_CRYPTO_hash (member_id,
-		      sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
-		      &sender);
+                      sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
+                      &sender);
   /* entertain both primary and an alternative sender/meta */
   if (((0 == memcmp (&sender, want->sender, sizeof (GNUNET_HashCode))) ||
        ((want->sender2 != NULL) &&
-	(0 == memcmp (&sender, want->sender2, sizeof (GNUNET_HashCode))))) &&
+        (0 == memcmp (&sender, want->sender2, sizeof (GNUNET_HashCode))))) &&
       (((member_info == NULL) && (want->meta == NULL)) ||
        ((member_info != NULL) &&
-	(((want->meta != NULL) &&
-	  GNUNET_CONTAINER_meta_data_test_equal (member_info,
-						 want->meta)) ||
-	 ((want->meta2 != NULL) &&
-	  GNUNET_CONTAINER_meta_data_test_equal (member_info,
-						 want->meta2))))) &&
+        (((want->meta != NULL) &&
+          GNUNET_CONTAINER_meta_data_test_equal (member_info,
+                                                 want->meta)) ||
+         ((want->meta2 != NULL) &&
+          GNUNET_CONTAINER_meta_data_test_equal (member_info,
+                                                 want->meta2))))) &&
       (options == want->opt))
     {
       /* remember Bob's public key, we need it to send private message */
       if (NULL == bob_public_key &&
-	  (0 == memcmp (&bob, want->sender, sizeof (GNUNET_HashCode))))
-	bob_public_key =
-	  GNUNET_memdup (member_id,
-			 sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded));
+          (0 == memcmp (&bob, want->sender, sizeof (GNUNET_HashCode))))
+        bob_public_key =
+          GNUNET_memdup (member_id,
+                         sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded));
       if (want->sender2 != NULL)
-	{
-	  /* flush alternative sender */
-	  if (0 == memcmp (&sender, want->sender, sizeof (GNUNET_HashCode)))
-	    {
-	      want->sender = want->sender2;
-	      want->meta = want->meta2;
-	    }
-	  want->sender2 = NULL;
-	  want->meta2 = NULL;
-	}
+        {
+          /* flush alternative sender */
+          if (0 == memcmp (&sender, want->sender, sizeof (GNUNET_HashCode)))
+            {
+              want->sender = want->sender2;
+              want->meta = want->meta2;
+            }
+          want->sender2 = NULL;
+          want->meta2 = NULL;
+        }
       else
-	if (NULL != want->next_task)
-	  GNUNET_SCHEDULER_add_now (want->next_task, want->next_task_cls);
+        if (NULL != want->next_task)
+          GNUNET_SCHEDULER_add_now (want->next_task, want->next_task_cls);
     }
   else
     {
@@ -282,29 +282,29 @@
 
 static int
 receive_cb (void *cls,
-	    struct GNUNET_CHAT_Room *room,
-	    const GNUNET_HashCode *sender,
-	    const struct GNUNET_CONTAINER_MetaData *meta,
-	    const char *message,
-	    struct GNUNET_TIME_Absolute timestamp,
-	    enum GNUNET_CHAT_MsgOptions options)
+            struct GNUNET_CHAT_Room *room,
+            const GNUNET_HashCode *sender,
+            const struct GNUNET_CONTAINER_MetaData *meta,
+            const char *message,
+            struct GNUNET_TIME_Absolute timestamp,
+            enum GNUNET_CHAT_MsgOptions options)
 {
   struct Wanted *want = cls;
 
 #if VERBOSE
   printf ("%s - told that %s said '%s'\n",
-	  want->me,
-	  meta == NULL ? NULL
-	  : GNUNET_CONTAINER_meta_data_get_by_type (meta,
-						    EXTRACTOR_METATYPE_TITLE),
-	  message);
+          want->me,
+          meta == NULL ? NULL
+          : GNUNET_CONTAINER_meta_data_get_by_type (meta,
+                                                    EXTRACTOR_METATYPE_TITLE),
+          message);
 #endif
 
   if ((want->msg != NULL) && (0 == strcmp (message, want->msg)) &&
       (((sender == NULL) && (want->sender == NULL)) ||
        ((sender != NULL) && (want->sender != NULL) &&
-	(0 == memcmp (sender, want->sender,
-		      sizeof (GNUNET_HashCode))))) &&
+        (0 == memcmp (sender, want->sender,
+                      sizeof (GNUNET_HashCode))))) &&
       (GNUNET_CONTAINER_meta_data_test_equal (meta, want->meta)) &&
       (options == want->opt) &&
       /* Not == since the library sets the actual timestamp, so it may be
@@ -313,7 +313,7 @@
       (timestamp.abs_value >= want->timestamp.abs_value))
     {
       if (NULL != want->next_task)
-	GNUNET_SCHEDULER_add_now (want->next_task, want->next_task_cls);
+        GNUNET_SCHEDULER_add_now (want->next_task, want->next_task_cls);
     }
   else
     {
@@ -329,7 +329,7 @@
 
 static void
 wait_until_all_ready (void *cls,
-		      const struct GNUNET_SCHEDULER_TaskContext *tc)
+                      const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
   GNUNET_SCHEDULER_Task task = cls;
 
@@ -344,15 +344,15 @@
   else
     wait_task =
       GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS,
-								   5000),
-				    &wait_until_all_ready,
-				    task);
+                                                                   5000),
+                                    &wait_until_all_ready,
+                                    task);
 }
 
 
 static void
 set_alice_ready (void *cls,
-	   const struct GNUNET_SCHEDULER_TaskContext *tc)
+           const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
   alice_ready = GNUNET_YES;
 }
@@ -360,7 +360,7 @@
 
 static void
 set_bob_ready (void *cls,
-	   const struct GNUNET_SCHEDULER_TaskContext *tc)
+           const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
   bob_ready = GNUNET_YES;
 }
@@ -368,7 +368,7 @@
 
 static void
 disconnect_alice (void *cls,
-		  const struct GNUNET_SCHEDULER_TaskContext *tc)
+                  const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
 #if VERBOSE
   printf ("Alice is leaving.\n");
@@ -384,7 +384,7 @@
 
 static void
 disconnect_bob (void *cls,
-		const struct GNUNET_SCHEDULER_TaskContext *tc)
+                const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
 #if VERBOSE
   printf ("Bod is leaving.\n");
@@ -404,7 +404,7 @@
 
 static void
 disconnect_carol (void *cls,
-		  const struct GNUNET_SCHEDULER_TaskContext *tc)
+                  const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
 #if VERBOSE
   printf ("Carol is leaving.\n");
@@ -430,7 +430,7 @@
 
 static void
 send_from_alice_to_bob (void *cls,
-			const struct GNUNET_SCHEDULER_TaskContext *tc)
+                        const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
   uint32_t seq;
 
@@ -453,18 +453,18 @@
   carol_wanted.next_task = NULL;
   carol_wanted.next_task_cls = NULL;
   GNUNET_CHAT_send_message (alice_room,
-			    "Hi Bob!",
-			    GNUNET_CHAT_MSG_PRIVATE,
-			    bob_public_key, &seq);
+                            "Hi Bob!",
+                            GNUNET_CHAT_MSG_PRIVATE,
+                            bob_public_key, &seq);
   finish_task = GNUNET_SCHEDULER_add_delayed (PM_TIMEOUT,
-					      &wait_until_all_ready,
-					      &disconnect_carol);
+                                              &wait_until_all_ready,
+                                              &disconnect_carol);
 }
 
 
 static void
 prepare_bob_for_alice_task (void *cls,
-			    const struct GNUNET_SCHEDULER_TaskContext *tc)
+                            const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
   bob_wanted.meta = alice_meta;
   bob_wanted.sender = &alice;
@@ -477,7 +477,7 @@
 
 static void
 prepare_carol_for_alice_and_bob_task (void *cls,
-				      const struct GNUNET_SCHEDULER_TaskContext *tc)
+                                      const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
   carol_wanted.meta = alice_meta;
   carol_wanted.sender = &alice;
@@ -494,7 +494,7 @@
 
 static void
 join_carol_task (void *cls,
-		 const struct GNUNET_SCHEDULER_TaskContext *tc)
+                 const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
 #if VERBOSE
   printf ("Carol joining\n");
@@ -517,11 +517,11 @@
   carol_wanted.next_task_cls = NULL;
   carol_room =
     GNUNET_CHAT_join_room (is_p2p ? p3.cfg : p1.cfg, "carol", carol_meta,
-			   "test", -1,
-			   &join_cb, &carol_wanted,
-			   &receive_cb, &carol_wanted,
-			   &member_list_cb, &carol_wanted,
-			   NULL, NULL, &carol);
+                           "test", -1,
+                           &join_cb, &carol_wanted,
+                           &receive_cb, &carol_wanted,
+                           &member_list_cb, &carol_wanted,
+                           NULL, NULL, &carol);
   if (NULL == carol_room)
     {
       GNUNET_SCHEDULER_cancel (kill_task);
@@ -537,7 +537,7 @@
 
 static void
 join_bob_task (void *cls,
-	       const struct GNUNET_SCHEDULER_TaskContext *tc)
+               const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
 #if VERBOSE
   printf ("Bob joining\n");
@@ -554,11 +554,11 @@
   bob_ready = GNUNET_NO;
   bob_room =
     GNUNET_CHAT_join_room (is_p2p ? p2.cfg : p1.cfg, "bob", bob_meta,
-			   "test", -1,
-			   &join_cb, &bob_wanted,
-			   &receive_cb, &bob_wanted,
-			   &member_list_cb, &bob_wanted,
-			   NULL, NULL, &bob);
+                           "test", -1,
+                           &join_cb, &bob_wanted,
+                           &receive_cb, &bob_wanted,
+                           &member_list_cb, &bob_wanted,
+                           NULL, NULL, &bob);
   if (NULL == bob_room)
     {
       GNUNET_SCHEDULER_cancel (kill_task);
@@ -572,7 +572,7 @@
 
 static void
 join_alice_task (void *cls,
-		 const struct GNUNET_SCHEDULER_TaskContext *tc)
+                 const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
 #if VERBOSE
   printf ("Alice joining\n");
@@ -581,11 +581,11 @@
   alice_wanted.next_task_cls = NULL;
   alice_room =
     GNUNET_CHAT_join_room (p1.cfg, "alice", alice_meta,
-			   "test", -1,
-			   &join_cb, &alice_wanted,
-			   &receive_cb, &alice_wanted,
-			   &member_list_cb, &alice_wanted,
-			   NULL, NULL, &alice);
+                           "test", -1,
+                           &join_cb, &alice_wanted,
+                           &receive_cb, &alice_wanted,
+                           &member_list_cb, &alice_wanted,
+                           NULL, NULL, &alice);
   if (NULL == alice_room)
     {
       GNUNET_SCHEDULER_cancel (kill_task);
@@ -618,28 +618,28 @@
   carol_wanted.me = "Carol";
   alice_meta = GNUNET_CONTAINER_meta_data_create ();
   GNUNET_CONTAINER_meta_data_insert (alice_meta,
-				     "<gnunet>",
-				     EXTRACTOR_METATYPE_TITLE,
-				     EXTRACTOR_METAFORMAT_UTF8,
-				     "text/plain",
-				     "Alice",
-				     strlen("Alice")+1);
+                                     "<gnunet>",
+                                     EXTRACTOR_METATYPE_TITLE,
+                                     EXTRACTOR_METAFORMAT_UTF8,
+                                     "text/plain",
+                                     "Alice",
+                                     strlen("Alice")+1);
   bob_meta = GNUNET_CONTAINER_meta_data_create ();
   GNUNET_CONTAINER_meta_data_insert (bob_meta,
-				     "<gnunet>",
-				     EXTRACTOR_METATYPE_TITLE,
-				     EXTRACTOR_METAFORMAT_UTF8,
-				     "text/plain",
-				     "Bob",
-				     strlen("Bob")+1);
+                                     "<gnunet>",
+                                     EXTRACTOR_METATYPE_TITLE,
+                                     EXTRACTOR_METAFORMAT_UTF8,
+                                     "text/plain",
+                                     "Bob",
+                                     strlen("Bob")+1);
   carol_meta = GNUNET_CONTAINER_meta_data_create ();
   GNUNET_CONTAINER_meta_data_insert (carol_meta,
-				     "<gnunet>",
-				     EXTRACTOR_METATYPE_TITLE,
-				     EXTRACTOR_METAFORMAT_UTF8,
-				     "text/plain",
-				     "Carol",
-				     strlen("Carol")+1);
+                                     "<gnunet>",
+                                     EXTRACTOR_METATYPE_TITLE,
+                                     EXTRACTOR_METAFORMAT_UTF8,
+                                     "text/plain",
+                                     "Carol",
+                                     strlen("Carol")+1);
   kill_task = GNUNET_SCHEDULER_add_delayed (KILL_TIMEOUT, &timeout_kill, NULL);
   GNUNET_SCHEDULER_add_now (&join_alice_task, NULL);
 }
@@ -663,18 +663,18 @@
 
   GNUNET_log_setup ("test_chat", 
 #if VERBOSE
-		    "DEBUG",
+                    "DEBUG",
 #else
-		    "WARNING",
+                    "WARNING",
 #endif
-		    NULL);
+                    NULL);
   if (strstr(argv[0], "p2p") != NULL)
     {
       is_p2p = GNUNET_YES;
     }
   GNUNET_PROGRAM_run ((sizeof (argvx) / sizeof (char *)) - 1,
                       argvx, "test-chat",
-		      "nohelp", options, &run, NULL);
+                      "nohelp", options, &run, NULL);
   stop_arm (&p1);
   GNUNET_CONTAINER_meta_data_destroy (alice_meta);
   GNUNET_CONTAINER_meta_data_destroy (bob_meta);
diff -ur gnunet/src/include/gnunet_chat_service.h gnunet.notabs/src/include/gnunet_chat_service.h
--- gnunet/src/include/gnunet_chat_service.h	2011-02-28 23:05:59.376669160 +0300
+++ gnunet.notabs/src/include/gnunet_chat_service.h	2011-03-03 06:53:06.113335823 +0300
@@ -110,12 +110,12 @@
  *         accept (but user is away), GNUNET_SYSERR to signal denied delivery
  */
 typedef int (*GNUNET_CHAT_MessageCallback) (void *cls,
-					    struct GNUNET_CHAT_Room *room,
-					    const GNUNET_HashCode *sender,
-					    const struct GNUNET_CONTAINER_MetaData *member_info,
-					    const char *message,
-					    struct GNUNET_TIME_Absolute timestamp,
-					    enum GNUNET_CHAT_MsgOptions options);
+                                            struct GNUNET_CHAT_Room *room,
+                                            const GNUNET_HashCode *sender,
+                                            const struct GNUNET_CONTAINER_MetaData *member_info,
+                                            const char *message,
+                                            struct GNUNET_TIME_Absolute timestamp,
+                                            enum GNUNET_CHAT_MsgOptions options);
 
 /**
  * Callback used for notification that another room member has joined or left.
@@ -128,9 +128,9 @@
  * @return GNUNET_OK
  */
 typedef int (*GNUNET_CHAT_MemberListCallback) (void *cls,
-					       const struct GNUNET_CONTAINER_MetaData *member_info,
-					       const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *member_id,
-					       enum GNUNET_CHAT_MsgOptions options);
+                                               const struct GNUNET_CONTAINER_MetaData *member_info,
+                                               const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *member_id,
+                                               enum GNUNET_CHAT_MsgOptions options);
 
 /**
  * Callback used for message delivery confirmations.
@@ -144,10 +144,10 @@
  *         confirmations from anyone for this message
  */
 typedef int (*GNUNET_CHAT_MessageConfirmation) (void *cls,
-						struct GNUNET_CHAT_Room *room,
-						uint32_t orig_seq_number,
-						struct GNUNET_TIME_Absolute timestamp,
-						const GNUNET_HashCode *receiver);
+                                                struct GNUNET_CHAT_Room *room,
+                                                uint32_t orig_seq_number,
+                                                struct GNUNET_TIME_Absolute timestamp,
+                                                const GNUNET_HashCode *receiver);
 
 /**
  * Join a chat room.
@@ -175,19 +175,19 @@
  */
 struct GNUNET_CHAT_Room *
 GNUNET_CHAT_join_room (const struct GNUNET_CONFIGURATION_Handle *cfg,
-		       const char *nick_name,
-		       struct GNUNET_CONTAINER_MetaData *member_info,
-		       const char *room_name,
-		       enum GNUNET_CHAT_MsgOptions msg_options,
-		       GNUNET_CHAT_JoinCallback joinCallback,
-		       void *join_cls,
-		       GNUNET_CHAT_MessageCallback messageCallback,
-		       void *message_cls,
-		       GNUNET_CHAT_MemberListCallback memberCallback,
-		       void *member_cls,
-		       GNUNET_CHAT_MessageConfirmation confirmationCallback,
-		       void *confirmation_cls,
-		       GNUNET_HashCode *me);
+                       const char *nick_name,
+                       struct GNUNET_CONTAINER_MetaData *member_info,
+                       const char *room_name,
+                       enum GNUNET_CHAT_MsgOptions msg_options,
+                       GNUNET_CHAT_JoinCallback joinCallback,
+                       void *join_cls,
+                       GNUNET_CHAT_MessageCallback messageCallback,
+                       void *message_cls,
+                       GNUNET_CHAT_MemberListCallback memberCallback,
+                       void *member_cls,
+                       GNUNET_CHAT_MessageConfirmation confirmationCallback,
+                       void *confirmation_cls,
+                       GNUNET_HashCode *me);
 
 /**
  * Send a message.
@@ -200,10 +200,10 @@
  */
 void
 GNUNET_CHAT_send_message (struct GNUNET_CHAT_Room *room,
-			  const char *message,
-			  enum GNUNET_CHAT_MsgOptions options,
-			  const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *receiver,
-			  uint32_t *sequence_number);
+                          const char *message,
+                          enum GNUNET_CHAT_MsgOptions options,
+                          const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *receiver,
+                          uint32_t *sequence_number);
 
 
 /**

Christian Grothoff

2011-03-04 09:10

manager   ~0004284

Applied as SVN 14581 and 14582.

Issue History

Date Modified Username Field Change
2011-03-03 05:13 vminko New Issue
2011-03-03 05:13 vminko File Added: gnunet-svn@14557-chat-update.patch
2011-03-03 05:13 vminko File Added: gnunet-svn@14557-chat-indentation-fix.patch
2011-03-04 09:10 Christian Grothoff Note Added: 0004284
2011-03-04 09:10 Christian Grothoff Status new => resolved
2011-03-04 09:10 Christian Grothoff Resolution open => fixed
2011-03-04 09:10 Christian Grothoff Assigned To => Christian Grothoff
2011-04-27 16:18 Christian Grothoff Status resolved => closed