cleanup
authorlurchi <lurchi@strangeplace.net>
Sat, 30 Dec 2017 19:37:01 +0000 (20:37 +0100)
committerlurchi <lurchi@strangeplace.net>
Sat, 30 Dec 2017 19:42:47 +0000 (20:42 +0100)
src/psyc/gnunet-service-psyc.c
src/social/social_api.c
src/social/test_social.c

index 7408864239ed68664bde8cf0002e43c06db8e770..cf161435a626269ac4525bd852f0fc40956fb628 100644 (file)
@@ -1188,12 +1188,12 @@ fragment_queue_insert (struct Channel *chn,
     else if (GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_METHOD == first_ptype
              || frag_offset == fragq->header_size)
     { /* header is now complete */
-      GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+      GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                   "%p Header of message %" PRIu64 " is complete.\n",
                   chn,
                   GNUNET_ntohll (mmsg->message_id));
 
-      GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+      GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                   "%p Adding message %" PRIu64 " to queue.\n",
                   chn,
                   GNUNET_ntohll (mmsg->message_id));
@@ -1201,7 +1201,7 @@ fragment_queue_insert (struct Channel *chn,
     }
     else
     {
-      GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+      GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                   "%p Header of message %" PRIu64 " is NOT complete yet: %" PRIu64 " != %" PRIu64 "\n",
                   chn,
                   GNUNET_ntohll (mmsg->message_id),
@@ -1216,7 +1216,7 @@ fragment_queue_insert (struct Channel *chn,
     if (frag_offset == fragq->size)
       fragq->state = MSG_FRAG_STATE_END;
     else
-      GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+      GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                   "%p Message %" PRIu64 " is NOT complete yet: %" PRIu64 " != %" PRIu64 "\n",
                   chn,
                   GNUNET_ntohll (mmsg->message_id),
@@ -1271,7 +1271,7 @@ static void
 fragment_queue_run (struct Channel *chn, uint64_t msg_id,
                     struct FragmentQueue *fragq, uint8_t drop)
 {
-  GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "%p Running message fragment queue for message %" PRIu64 " (state: %u).\n",
               chn,
               msg_id,
@@ -1399,7 +1399,7 @@ store_recv_state_modify_result (void *cls, int64_t result,
 static uint64_t
 message_queue_run (struct Channel *chn)
 {
-  GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "%p Running message queue.\n", chn);
   uint64_t n = 0;
   uint64_t msg_id;
@@ -1407,7 +1407,7 @@ message_queue_run (struct Channel *chn)
   while (GNUNET_YES == GNUNET_CONTAINER_heap_peek2 (chn->recv_msgs, NULL,
                                                     &msg_id))
   {
-    GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "%p Processing message %" PRIu64 " in queue.\n", chn, msg_id);
     struct GNUNET_HashCode msg_id_hash;
     hash_key_from_hll (&msg_id_hash, msg_id);
@@ -1417,7 +1417,7 @@ message_queue_run (struct Channel *chn)
 
     if (NULL == fragq || fragq->state <= MSG_FRAG_STATE_HEADER)
     {
-      GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+      GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                   "%p No fragq (%p) or header not complete.\n",
                   chn, fragq);
       break;
@@ -1439,7 +1439,7 @@ message_queue_run (struct Channel *chn)
             && (chn->max_message_id != msg_id - 1
                 && chn->max_message_id != msg_id))
         {
-          GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+          GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                       "%p Out of order message. "
                       "(%" PRIu64 " != %" PRIu64 " - 1)\n",
                       chn, chn->max_message_id, msg_id);
@@ -1455,7 +1455,7 @@ message_queue_run (struct Channel *chn)
         {
           if (msg_id - fragq->state_delta != chn->max_state_message_id)
           {
-            GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+            GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                         "%p Out of order stateful message. "
                         "(%" PRIu64 " - %" PRIu64 " != %" PRIu64 ")\n",
                         chn, msg_id, fragq->state_delta, chn->max_state_message_id);
@@ -1501,8 +1501,6 @@ message_queue_run (struct Channel *chn)
 static uint64_t
 message_queue_drop (struct Channel *chn)
 {
-  GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
-              "%p Dropping message queue.\n", chn);
   uint64_t n = 0;
   uint64_t msg_id;
   while (GNUNET_YES == GNUNET_CONTAINER_heap_peek2 (chn->recv_msgs, NULL,
@@ -2241,12 +2239,10 @@ transmit_message (struct Channel *chn)
 static void
 master_queue_message (struct Master *mst, struct TransmitMessage *tmit_msg)
 {
-  GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "%p master_queue_message()\n", mst);
-
   if (GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_METHOD == tmit_msg->first_ptype)
   {
     tmit_msg->id = ++mst->max_message_id;
-    GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "%p master_queue_message: message_id=%" PRIu64 "\n",
                 mst, tmit_msg->id);
     struct GNUNET_PSYC_MessageMethod *pmeth
@@ -2258,7 +2254,7 @@ master_queue_message (struct Master *mst, struct TransmitMessage *tmit_msg)
     }
     else if (pmeth->flags & GNUNET_PSYC_MASTER_TRANSMIT_STATE_MODIFY)
     {
-      GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+      GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                   "%p master_queue_message: state_delta=%" PRIu64 "\n",
                   mst, tmit_msg->id - mst->max_state_message_id);
       pmeth->state_delta = GNUNET_htonll (tmit_msg->id
@@ -2267,7 +2263,7 @@ master_queue_message (struct Master *mst, struct TransmitMessage *tmit_msg)
     }
     else
     {
-        GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+        GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                     "%p master_queue_message: state not modified\n", mst);
       pmeth->state_delta = GNUNET_htonll (GNUNET_PSYC_STATE_NOT_MODIFIED);
     }
index 48e376404fda5638ed9476ad38df77f7515a16a6..96ddfe912a2dfccab8bce19cf5db3d37aeef8567 100644 (file)
@@ -397,12 +397,9 @@ guest_cleanup (struct GNUNET_SOCIAL_Guest *gst)
 static void
 place_cleanup (struct GNUNET_SOCIAL_Place *plc)
 {
-  struct GNUNET_HashCode place_pub_hash;
-
-  GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
-              "place_cleanup\n");
-
-  GNUNET_CRYPTO_hash (&plc->pub_key, sizeof (plc->pub_key), &place_pub_hash);
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+              "cleaning up place %p\n",
+              plc);
   if (NULL != plc->tmit)
   {
     GNUNET_PSYC_transmit_destroy (plc->tmit);
@@ -433,11 +430,6 @@ place_cleanup (struct GNUNET_SOCIAL_Place *plc)
 static void
 place_disconnect (struct GNUNET_SOCIAL_Place *plc)
 {
-  struct GNUNET_HashCode place_pub_hash;
-
-  GNUNET_CRYPTO_hash (&plc->pub_key,
-                      sizeof (plc->pub_key),
-                      &place_pub_hash);
   place_cleanup (plc);
 }
 
@@ -1515,7 +1507,7 @@ GNUNET_SOCIAL_host_announce (struct GNUNET_SOCIAL_Host *hst,
                              void *notify_data_cls,
                              enum GNUNET_SOCIAL_AnnounceFlags flags)
 {
-  GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "PSYC_transmit_message for host, method: %s\n",
               method_name);
   if (GNUNET_OK ==
index 61dbd121cf0420792e303553cb2ecd945573acde..4d95cf005bcdb00749e9cb054d0c5d4408066452 100644 (file)
@@ -359,7 +359,7 @@ host_farewell2 (void *cls,
                const struct GNUNET_SOCIAL_Nym *nym,
                struct GNUNET_PSYC_Environment *env)
 {
-  GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+  GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
               "Nym left the place again.\n");
   GNUNET_SCHEDULER_add_now (&schedule_host_leave, NULL);
 }