diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-06-18 15:02:59 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-06-18 15:02:59 +0000 |
commit | e4794e7e4bc63d2023768e3b1017f19bd0d41c5f (patch) | |
tree | cc3573979a8e410998de3ca3d390ee0547d90faa /src/fs | |
parent | 2be168f3924a38f2d4f9071ccf53e6a032e9087d (diff) | |
download | gnunet-e4794e7e4bc63d2023768e3b1017f19bd0d41c5f.tar.gz gnunet-e4794e7e4bc63d2023768e3b1017f19bd0d41c5f.zip |
cleaning
Diffstat (limited to 'src/fs')
-rw-r--r-- | src/fs/gnunet-service-fs.c | 52 |
1 files changed, 20 insertions, 32 deletions
diff --git a/src/fs/gnunet-service-fs.c b/src/fs/gnunet-service-fs.c index 90d0cabaf..1c542386c 100644 --- a/src/fs/gnunet-service-fs.c +++ b/src/fs/gnunet-service-fs.c | |||
@@ -3414,38 +3414,6 @@ handle_start_search (void *cls, | |||
3414 | 3414 | ||
3415 | /* **************************** Startup ************************ */ | 3415 | /* **************************** Startup ************************ */ |
3416 | 3416 | ||
3417 | |||
3418 | /** | ||
3419 | * List of handlers for P2P messages | ||
3420 | * that we care about. | ||
3421 | */ | ||
3422 | static struct GNUNET_CORE_MessageHandler p2p_handlers[] = | ||
3423 | { | ||
3424 | { &handle_p2p_get, | ||
3425 | GNUNET_MESSAGE_TYPE_FS_GET, 0 }, | ||
3426 | { &handle_p2p_put, | ||
3427 | GNUNET_MESSAGE_TYPE_FS_PUT, 0 }, | ||
3428 | { NULL, 0, 0 } | ||
3429 | }; | ||
3430 | |||
3431 | |||
3432 | /** | ||
3433 | * List of handlers for the messages understood by this | ||
3434 | * service. | ||
3435 | */ | ||
3436 | static struct GNUNET_SERVER_MessageHandler handlers[] = { | ||
3437 | {&GNUNET_FS_handle_index_start, NULL, | ||
3438 | GNUNET_MESSAGE_TYPE_FS_INDEX_START, 0}, | ||
3439 | {&GNUNET_FS_handle_index_list_get, NULL, | ||
3440 | GNUNET_MESSAGE_TYPE_FS_INDEX_LIST_GET, sizeof(struct GNUNET_MessageHeader) }, | ||
3441 | {&GNUNET_FS_handle_unindex, NULL, GNUNET_MESSAGE_TYPE_FS_UNINDEX, | ||
3442 | sizeof (struct UnindexMessage) }, | ||
3443 | {&handle_start_search, NULL, GNUNET_MESSAGE_TYPE_FS_START_SEARCH, | ||
3444 | 0 }, | ||
3445 | {NULL, NULL, 0, 0} | ||
3446 | }; | ||
3447 | |||
3448 | |||
3449 | /** | 3417 | /** |
3450 | * Process fs requests. | 3418 | * Process fs requests. |
3451 | * | 3419 | * |
@@ -3458,6 +3426,26 @@ main_init (struct GNUNET_SCHEDULER_Handle *s, | |||
3458 | struct GNUNET_SERVER_Handle *server, | 3426 | struct GNUNET_SERVER_Handle *server, |
3459 | const struct GNUNET_CONFIGURATION_Handle *c) | 3427 | const struct GNUNET_CONFIGURATION_Handle *c) |
3460 | { | 3428 | { |
3429 | static const struct GNUNET_CORE_MessageHandler p2p_handlers[] = | ||
3430 | { | ||
3431 | { &handle_p2p_get, | ||
3432 | GNUNET_MESSAGE_TYPE_FS_GET, 0 }, | ||
3433 | { &handle_p2p_put, | ||
3434 | GNUNET_MESSAGE_TYPE_FS_PUT, 0 }, | ||
3435 | { NULL, 0, 0 } | ||
3436 | }; | ||
3437 | static const struct GNUNET_SERVER_MessageHandler handlers[] = { | ||
3438 | {&GNUNET_FS_handle_index_start, NULL, | ||
3439 | GNUNET_MESSAGE_TYPE_FS_INDEX_START, 0}, | ||
3440 | {&GNUNET_FS_handle_index_list_get, NULL, | ||
3441 | GNUNET_MESSAGE_TYPE_FS_INDEX_LIST_GET, sizeof(struct GNUNET_MessageHeader) }, | ||
3442 | {&GNUNET_FS_handle_unindex, NULL, GNUNET_MESSAGE_TYPE_FS_UNINDEX, | ||
3443 | sizeof (struct UnindexMessage) }, | ||
3444 | {&handle_start_search, NULL, GNUNET_MESSAGE_TYPE_FS_START_SEARCH, | ||
3445 | 0 }, | ||
3446 | {NULL, NULL, 0, 0} | ||
3447 | }; | ||
3448 | |||
3461 | sched = s; | 3449 | sched = s; |
3462 | cfg = c; | 3450 | cfg = c; |
3463 | stats = GNUNET_STATISTICS_create (sched, "fs", cfg); | 3451 | stats = GNUNET_STATISTICS_create (sched, "fs", cfg); |