aboutsummaryrefslogtreecommitdiff
path: root/src/datastore/datastore_api.c
diff options
context:
space:
mode:
authorDavid Barksdale <amatus@amat.us>2017-02-20 11:18:53 -0600
committerDavid Barksdale <amatus@amat.us>2017-02-20 11:21:29 -0600
commit4e96704538f882095eca84fed92a7811b299aca1 (patch)
tree2bcf0008f09aa3bc319bf2425f0f526b72fbc1ce /src/datastore/datastore_api.c
parentf6f7fbbe98c110867febbcca647da8308be123c7 (diff)
downloadgnunet-4e96704538f882095eca84fed92a7811b299aca1.tar.gz
gnunet-4e96704538f882095eca84fed92a7811b299aca1.zip
Remove unused GNUNET_DATASTORE_update() API call
Diffstat (limited to 'src/datastore/datastore_api.c')
-rw-r--r--src/datastore/datastore_api.c66
1 files changed, 0 insertions, 66 deletions
diff --git a/src/datastore/datastore_api.c b/src/datastore/datastore_api.c
index db485364e..311a61283 100644
--- a/src/datastore/datastore_api.c
+++ b/src/datastore/datastore_api.c
@@ -1126,72 +1126,6 @@ GNUNET_DATASTORE_release_reserve (struct GNUNET_DATASTORE_Handle *h,
1126 1126
1127 1127
1128/** 1128/**
1129 * Update a value in the datastore.
1130 *
1131 * @param h handle to the datastore
1132 * @param uid identifier for the value
1133 * @param priority how much to increase the priority of the value
1134 * @param expiration new expiration value should be MAX of existing and this argument
1135 * @param queue_priority ranking of this request in the priority queue
1136 * @param max_queue_size at what queue size should this request be dropped
1137 * (if other requests of higher priority are in the queue)
1138 * @param cont continuation to call when done
1139 * @param cont_cls closure for @a cont
1140 * @return NULL if the entry was not queued, otherwise a handle that can be used to
1141 * cancel; note that even if NULL is returned, the callback will be invoked
1142 * (or rather, will already have been invoked)
1143 */
1144struct GNUNET_DATASTORE_QueueEntry *
1145GNUNET_DATASTORE_update (struct GNUNET_DATASTORE_Handle *h,
1146 uint64_t uid,
1147 uint32_t priority,
1148 struct GNUNET_TIME_Absolute expiration,
1149 unsigned int queue_priority,
1150 unsigned int max_queue_size,
1151 GNUNET_DATASTORE_ContinuationWithStatus cont,
1152 void *cont_cls)
1153{
1154 struct GNUNET_DATASTORE_QueueEntry *qe;
1155 struct GNUNET_MQ_Envelope *env;
1156 struct UpdateMessage *um;
1157 union QueueContext qc;
1158
1159 if (NULL == cont)
1160 cont = &drop_status_cont;
1161 LOG (GNUNET_ERROR_TYPE_DEBUG,
1162 "Asked to update entry %llu raising priority by %u and expiration to %s\n",
1163 uid,
1164 (unsigned int) priority,
1165 GNUNET_STRINGS_absolute_time_to_string (expiration));
1166 env = GNUNET_MQ_msg (um,
1167 GNUNET_MESSAGE_TYPE_DATASTORE_UPDATE);
1168 um->priority = htonl (priority);
1169 um->expiration = GNUNET_TIME_absolute_hton (expiration);
1170 um->uid = GNUNET_htonll (uid);
1171
1172 qc.sc.cont = cont;
1173 qc.sc.cont_cls = cont_cls;
1174 qe = make_queue_entry (h,
1175 env,
1176 queue_priority,
1177 max_queue_size,
1178 GNUNET_MESSAGE_TYPE_DATASTORE_STATUS,
1179 &qc);
1180 if (NULL == qe)
1181 {
1182 LOG (GNUNET_ERROR_TYPE_DEBUG,
1183 "Could not create queue entry for UPDATE\n");
1184 return NULL;
1185 }
1186 GNUNET_STATISTICS_update (h->stats,
1187 gettext_noop ("# UPDATE requests executed"), 1,
1188 GNUNET_NO);
1189 process_queue (h);
1190 return qe;
1191}
1192
1193
1194/**
1195 * Explicitly remove some content from the database. 1129 * Explicitly remove some content from the database.
1196 * The @a cont continuation will be called with `status` 1130 * The @a cont continuation will be called with `status`
1197 * #GNUNET_OK" if content was removed, #GNUNET_NO 1131 * #GNUNET_OK" if content was removed, #GNUNET_NO