/**
* Timeout task
*/
-static struct GNUNET_SCHEDULER_Task * timeout_task;
-
+static struct GNUNET_SCHEDULER_Task *timeout_task;
/**
* Update task
*/
-static struct GNUNET_SCHEDULER_Task * update_task;
+static struct GNUNET_SCHEDULER_Task *update_task;
/**
* Timeout for next update pass
token_record,
&store_token_cont,
ego_entry);
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, ">>> Updating Token w/ %s\n", new_token);
token_destroy (new_token);
token_destroy (token);
GNUNET_free (new_ecdhe_privkey);
scopes = NULL;
}
+
static void
update_identities(void *cls);
+
/**
*
* Cleanup attr_map
* @param cls NULL
* @param key the key
* @param value the json_t attribute value
- * @return GNUNET_YES
+ * @return #GNUNET_YES
*/
static int
clear_ego_attrs (void *cls,
return GNUNET_YES;
}
+
/**
*
* Update all ID_TOKEN records for an identity and store them
* @param lbl the name of the record
* @param rd_count number of records
* @param rd record data
- *
*/
static void
token_collect (void *cls,
{
token_metadata_record = &rd[0];
token_record = &rd[1];
- } else {
+ }
+ else
+ {
token_record = &rd[0];
token_metadata_record = &rd[1];
}
label = GNUNET_strdup (lbl);
rd_exp = token_record->expiration_time;
- GNUNET_SCHEDULER_add_now (&handle_token_update, ego_entry);
+ GNUNET_SCHEDULER_add_now (&handle_token_update,
+ ego_entry);
}
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
">>> Updating Attributes finished\n");
ego_entry->attributes_dirty = GNUNET_NO;
- update_task = GNUNET_SCHEDULER_add_now (&update_identities, ego_entry);
+ update_task = GNUNET_SCHEDULER_add_now (&update_identities,
+ ego_entry);
return;
}
if (min_rel_exp.rel_value_us < MIN_WAIT_TIME.rel_value_us)
min_rel_exp = MIN_WAIT_TIME;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- ">>> Finished. Rescheduling in %d\n",
+ ">>> Finished. Rescheduling in %lu\n",
min_rel_exp.rel_value_us);
ns_it = NULL;
//finished -> reschedule
}
-
/**
* Function called initially to start update task
*/
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO, ">>> Starting Service\n");
//Initially iterate all itenties and refresh all tokens
- update_task = GNUNET_SCHEDULER_add_now (&update_identities, ego_head);
+ update_task = GNUNET_SCHEDULER_add_now (&update_identities,
+ ego_head);
}
+
/**
* Initial ego collection function.
*
struct GNUNET_IDENTITY_PROVIDER_IssueResultMessage *irm;
char *ticket_str;
char *token_str;
+
handle->ns_qe = NULL;
if (GNUNET_SYSERR == success)
{
GNUNET_SCHEDULER_add_now (&do_shutdown, NULL);
return;
}
- irm = create_issue_result_message (handle->label, ticket_str, token_str);
+ irm = create_issue_result_message (handle->label,
+ ticket_str,
+ token_str);
GNUNET_SERVER_notification_context_unicast (nc,
handle->client,
&irm->header,
token_expiration_interval = DEFAULT_TOKEN_EXPIRATION_INTERVAL;
}
- GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL,
- &do_shutdown, NULL);
+ GNUNET_SCHEDULER_add_shutdown (&do_shutdown, NULL);
}
/**
- *
* The main function
*
* @param argc number of arguments from the cli
* @param argv command line arguments
* @return 0 ok, 1 on error
- *
*/
int
main (int argc, char *const *argv)
&run, NULL)) ? 0 : 1;
}
-/* end of gnunet-rest-server.c */
+/* end of gnunet-service-identity-provider.c */