summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index bd98b32..09fcf42 100644
--- a/src/main.c
+++ b/src/main.c
@@ -97,6 +97,11 @@ int main(int argc, char **argv)
GDbServer *server; /* Enregistrements locaux */
GGenConfig *config; /* Configuration globale */
bool status; /* Bilan d'opérations */
+
+
+ char *author; /* Identification à diffuser */
+ char *pub; /* Chemin de la clef publique */
+
const char *filename; /* Chemin du dernier projet */
GStudyProject *project; /* Nouveau projet courant */
@@ -176,7 +181,19 @@ int main(int argc, char **argv)
status = complete_loading_of_all_gui_components(config);
if (!status) goto exit_complete_gui;
- server = g_db_server_new("localhost", 1337);
+
+
+ /* Utilisateur représenté */
+
+ if (!g_generic_config_get_value(config, MPK_AUTHOR_NAME, &author))
+ /*goto glbcl_exit*/;
+
+ /* Chemin vers la clef privée */
+
+ pub = get_xdg_config_dir("chrysalide" G_DIR_SEPARATOR_S "id_rsa.pub");
+
+
+ server = g_db_server_new(author, pub, "localhost", 1337);
g_db_server_start(server);
/* Charge le dernier projet */