aboutsummaryrefslogtreecommitdiff
path: root/src/scalarproduct/scalarproduct_api.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2014-12-03 15:37:28 +0000
committerChristian Grothoff <christian@grothoff.org>2014-12-03 15:37:28 +0000
commit0de7931d8c76cccdfc98290c89fd91a502e5f012 (patch)
tree5a32a7f33e9665f4ea0675216b462d8a15a1d462 /src/scalarproduct/scalarproduct_api.c
parent7c4b0e7fb12bdf7e6cadfa4cf8e97ee84f128ce0 (diff)
downloadgnunet-0de7931d8c76cccdfc98290c89fd91a502e5f012.tar.gz
gnunet-0de7931d8c76cccdfc98290c89fd91a502e5f012.zip
-simplify logic
Diffstat (limited to 'src/scalarproduct/scalarproduct_api.c')
-rw-r--r--src/scalarproduct/scalarproduct_api.c38
1 files changed, 20 insertions, 18 deletions
diff --git a/src/scalarproduct/scalarproduct_api.c b/src/scalarproduct/scalarproduct_api.c
index 6672e0e8f..5cb827838 100644
--- a/src/scalarproduct/scalarproduct_api.c
+++ b/src/scalarproduct/scalarproduct_api.c
@@ -63,26 +63,11 @@ struct GNUNET_SCALARPRODUCT_ComputationHandle
63 struct GNUNET_CLIENT_Connection *client; 63 struct GNUNET_CLIENT_Connection *client;
64 64
65 /** 65 /**
66 * The shared session key identifying this computation
67 */
68 struct GNUNET_HashCode key;
69
70 /**
71 * Current transmit handle. 66 * Current transmit handle.
72 */ 67 */
73 struct GNUNET_CLIENT_TransmitHandle *th; 68 struct GNUNET_CLIENT_TransmitHandle *th;
74 69
75 /** 70 /**
76 * count of all @e elements we offer for computation
77 */
78 uint32_t element_count_total;
79
80 /**
81 * count of the transfered @e elements we offer for computation
82 */
83 uint32_t element_count_transfered;
84
85 /**
86 * the client's elements which 71 * the client's elements which
87 */ 72 */
88 struct GNUNET_SCALARPRODUCT_Element *elements; 73 struct GNUNET_SCALARPRODUCT_Element *elements;
@@ -113,15 +98,31 @@ struct GNUNET_SCALARPRODUCT_ComputationHandle
113 */ 98 */
114 GNUNET_SCALARPRODUCT_ResponseMessageHandler response_proc; 99 GNUNET_SCALARPRODUCT_ResponseMessageHandler response_proc;
115 100
101 /**
102 * The shared session key identifying this computation
103 */
104 struct GNUNET_HashCode key;
105
106 /**
107 * count of all @e elements we offer for computation
108 */
109 uint32_t element_count_total;
110
111 /**
112 * count of the transfered @e elements we offer for computation
113 */
114 uint32_t element_count_transfered;
115
116}; 116};
117 117
118 118
119/** 119/**
120 * Handles the STATUS received from the service for a response, does 120 * Handles the STATUS received from the service for a response, does
121 * not contain a payload. 121 * not contain a payload. Called when we participate as "Bob" via
122 * #GNUNET_SCALARPRODUCT_accept_computation().
122 * 123 *
123 * @param h our Handle 124 * @param h our Handle
124 * @param msg Pointer to the response received 125 * @param msg the response received
125 * @param status the condition the request was terminated with (eg: disconnect) 126 * @param status the condition the request was terminated with (eg: disconnect)
126 */ 127 */
127static void 128static void
@@ -138,7 +139,8 @@ process_status_message (struct GNUNET_SCALARPRODUCT_ComputationHandle *h,
138 139
139/** 140/**
140 * Handles the RESULT received from the service for a request, should 141 * Handles the RESULT received from the service for a request, should
141 * contain a result MPI value 142 * contain a result MPI value. Called when we participate as "Alice" via
143 * #GNUNET_SCALARPRODUCT_start_computation().
142 * 144 *
143 * @param h our Handle 145 * @param h our Handle
144 * @param msg Pointer to the response received 146 * @param msg Pointer to the response received