gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r33220 - gnunet/src/scalarproduct


From: gnunet
Subject: [GNUnet-SVN] r33220 - gnunet/src/scalarproduct
Date: Thu, 8 May 2014 12:52:37 +0200

Author: cfuchs
Date: 2014-05-08 12:52:37 +0200 (Thu, 08 May 2014)
New Revision: 33220

Modified:
   gnunet/src/scalarproduct/gnunet-service-scalarproduct.c
Log:
- updated error reporting functionality for the service
- client side initialization adapted

Modified: gnunet/src/scalarproduct/gnunet-service-scalarproduct.c
===================================================================
--- gnunet/src/scalarproduct/gnunet-service-scalarproduct.c     2014-05-08 
10:32:51 UTC (rev 33219)
+++ gnunet/src/scalarproduct/gnunet-service-scalarproduct.c     2014-05-08 
10:52:37 UTC (rev 33220)
@@ -771,6 +771,7 @@
   }
   if (s->transferred_element_count == s->used_element_count) {
     // final part
+    s->active = GNUNET_NO;
     GNUNET_free (s->r_prime);
     GNUNET_free (s->r);
     s->r_prime = NULL;
@@ -867,6 +868,7 @@
   }
   else {
     //singlepart
+    s->active = GNUNET_NO;
     GNUNET_free (s->r);
     s->r = NULL;
     GNUNET_free (s->r_prime);
@@ -1607,6 +1609,7 @@
   }
 
   s = GNUNET_new (struct ServiceSession);
+  s->active = GNUNET_YES;
   s->client_notification_task = GNUNET_SCHEDULER_NO_TASK;
   s->client = client;
   s->total = total_count;
@@ -2220,6 +2223,10 @@
   // send message with product to client
   if (NULL != s->client){
     //Alice
+    if (NULL != s->product)
+      s->active = GNUNET_NO;
+    else
+      s->active = GNUNET_SYSERR;
     s->client_notification_task =
           GNUNET_SCHEDULER_add_now (&prepare_client_response,
                                     s);
@@ -2360,7 +2367,7 @@
 
   // terminate all owned open channels.
   for (s = from_client_head; NULL != s; s = s->next) {
-    if ((0/*//TODO: not finalized*/) && (NULL != s->channel)) {
+    if ((GNUNET_NO != s->active) && (NULL != s->channel)) {
       GNUNET_CADET_channel_destroy (s->channel);
       s->channel = NULL;
     }




reply via email to

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