diff options
author | Gabor X Toth <*@tg-x.net> | 2016-09-23 14:26:55 +0000 |
---|---|---|
committer | Gabor X Toth <*@tg-x.net> | 2016-09-23 14:26:55 +0000 |
commit | 451fd32170103921993d876d765a8755ce737a0b (patch) | |
tree | ad41cd960f7f8b0f80d9967332ffc0a85e9cb0c1 /src/social/gnunet-social.c | |
parent | 3e872864741aaa83be947b614eafb4fef2c74253 (diff) | |
download | gnunet-451fd32170103921993d876d765a8755ce737a0b.tar.gz gnunet-451fd32170103921993d876d765a8755ce737a0b.zip |
multicast,psyc,social: remove core dependencny
Diffstat (limited to 'src/social/gnunet-social.c')
-rw-r--r-- | src/social/gnunet-social.c | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/src/social/gnunet-social.c b/src/social/gnunet-social.c index 98a48c294..afd06028c 100644 --- a/src/social/gnunet-social.c +++ b/src/social/gnunet-social.c | |||
@@ -29,7 +29,6 @@ | |||
29 | #include "platform.h" | 29 | #include "platform.h" |
30 | #include "gnunet_util_lib.h" | 30 | #include "gnunet_util_lib.h" |
31 | #include "gnunet_social_service.h" | 31 | #include "gnunet_social_service.h" |
32 | #include "gnunet_core_service.h" | ||
33 | 32 | ||
34 | #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 30) | 33 | #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 30) |
35 | 34 | ||
@@ -139,7 +138,6 @@ struct GNUNET_SCHEDULER_Task *timeout_task; | |||
139 | 138 | ||
140 | const struct GNUNET_CONFIGURATION_Handle *cfg; | 139 | const struct GNUNET_CONFIGURATION_Handle *cfg; |
141 | 140 | ||
142 | struct GNUNET_CORE_Handle *core; | ||
143 | struct GNUNET_PeerIdentity peer, this_peer; | 141 | struct GNUNET_PeerIdentity peer, this_peer; |
144 | 142 | ||
145 | struct GNUNET_SOCIAL_App *app; | 143 | struct GNUNET_SOCIAL_App *app; |
@@ -1086,9 +1084,6 @@ app_recv_ego (void *cls, | |||
1086 | static void | 1084 | static void |
1087 | app_connect (void *cls) | 1085 | app_connect (void *cls) |
1088 | { | 1086 | { |
1089 | GNUNET_CORE_disconnecT (core); | ||
1090 | core = NULL; | ||
1091 | |||
1092 | app = GNUNET_SOCIAL_app_connect (cfg, opt_app, | 1087 | app = GNUNET_SOCIAL_app_connect (cfg, opt_app, |
1093 | app_recv_ego, | 1088 | app_recv_ego, |
1094 | app_recv_host, | 1089 | app_recv_host, |
@@ -1098,20 +1093,6 @@ app_connect (void *cls) | |||
1098 | } | 1093 | } |
1099 | 1094 | ||
1100 | 1095 | ||
1101 | /* CORE */ | ||
1102 | |||
1103 | |||
1104 | static void | ||
1105 | core_connected (void *cls, const struct GNUNET_PeerIdentity *my_identity) | ||
1106 | { | ||
1107 | this_peer = *my_identity; | ||
1108 | GNUNET_SCHEDULER_add_now (app_connect, NULL); | ||
1109 | } | ||
1110 | |||
1111 | |||
1112 | /* RUN */ | ||
1113 | |||
1114 | |||
1115 | /** | 1096 | /** |
1116 | * Main function run by the scheduler. | 1097 | * Main function run by the scheduler. |
1117 | * | 1098 | * |
@@ -1125,6 +1106,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
1125 | const struct GNUNET_CONFIGURATION_Handle *c) | 1106 | const struct GNUNET_CONFIGURATION_Handle *c) |
1126 | { | 1107 | { |
1127 | cfg = c; | 1108 | cfg = c; |
1109 | GNUNET_CRYPTO_get_peer_identity (cfg, &this_peer); | ||
1128 | 1110 | ||
1129 | if (!opt_method) | 1111 | if (!opt_method) |
1130 | opt_method = "message"; | 1112 | opt_method = "message"; |
@@ -1181,7 +1163,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
1181 | } | 1163 | } |
1182 | } | 1164 | } |
1183 | 1165 | ||
1184 | core = GNUNET_CORE_connecT (cfg, NULL, &core_connected, NULL, NULL, NULL); | 1166 | GNUNET_SCHEDULER_add_now (app_connect, NULL); |
1185 | } | 1167 | } |
1186 | 1168 | ||
1187 | 1169 | ||