diff options
Diffstat (limited to 'src/auction/gnunet-service-auction.c')
-rw-r--r-- | src/auction/gnunet-service-auction.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/src/auction/gnunet-service-auction.c b/src/auction/gnunet-service-auction.c index ed1be20d8..82519919d 100644 --- a/src/auction/gnunet-service-auction.c +++ b/src/auction/gnunet-service-auction.c | |||
@@ -36,7 +36,7 @@ | |||
36 | * @return #GNUNET_OK (always) | 36 | * @return #GNUNET_OK (always) |
37 | */ | 37 | */ |
38 | static int | 38 | static int |
39 | check_create(void *cls, const struct GNUNET_AUCTION_ClientCreateMessage *msg) | 39 | check_create (void *cls, const struct GNUNET_AUCTION_ClientCreateMessage *msg) |
40 | { | 40 | { |
41 | /* always well-formed due to arbitrary length description */ | 41 | /* always well-formed due to arbitrary length description */ |
42 | return GNUNET_OK; | 42 | return GNUNET_OK; |
@@ -50,7 +50,7 @@ check_create(void *cls, const struct GNUNET_AUCTION_ClientCreateMessage *msg) | |||
50 | * @param msg the actual message received | 50 | * @param msg the actual message received |
51 | */ | 51 | */ |
52 | static void | 52 | static void |
53 | handle_create(void *cls, const struct GNUNET_AUCTION_ClientCreateMessage *msg) | 53 | handle_create (void *cls, const struct GNUNET_AUCTION_ClientCreateMessage *msg) |
54 | { | 54 | { |
55 | struct GNUNET_SERVICE_Client *client = cls; | 55 | struct GNUNET_SERVICE_Client *client = cls; |
56 | // struct GNUNET_MQ_Handle *mq; | 56 | // struct GNUNET_MQ_Handle *mq; |
@@ -58,10 +58,10 @@ handle_create(void *cls, const struct GNUNET_AUCTION_ClientCreateMessage *msg) | |||
58 | // struct GNUNET_AUCTION_blabla em; | 58 | // struct GNUNET_AUCTION_blabla em; |
59 | uint16_t size; | 59 | uint16_t size; |
60 | 60 | ||
61 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 61 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
62 | "Received CREATE message from client\n"); | 62 | "Received CREATE message from client\n"); |
63 | 63 | ||
64 | size = ntohs(msg->header.size); | 64 | size = ntohs (msg->header.size); |
65 | 65 | ||
66 | /**TODO: create auction and return auction object */ | 66 | /**TODO: create auction and return auction object */ |
67 | // mq = GNUNET_SERVICE_client_get_mq (client); | 67 | // mq = GNUNET_SERVICE_client_get_mq (client); |
@@ -69,7 +69,7 @@ handle_create(void *cls, const struct GNUNET_AUCTION_ClientCreateMessage *msg) | |||
69 | // env = GNUNET_MQ_msg_copy (&em.header); | 69 | // env = GNUNET_MQ_msg_copy (&em.header); |
70 | // GNUNET_MQ_send (mq, env); | 70 | // GNUNET_MQ_send (mq, env); |
71 | 71 | ||
72 | GNUNET_SERVICE_client_continue(client); | 72 | GNUNET_SERVICE_client_continue (client); |
73 | } | 73 | } |
74 | 74 | ||
75 | 75 | ||
@@ -79,7 +79,7 @@ handle_create(void *cls, const struct GNUNET_AUCTION_ClientCreateMessage *msg) | |||
79 | * @param cls unused | 79 | * @param cls unused |
80 | */ | 80 | */ |
81 | static void | 81 | static void |
82 | cleanup_task(void *cls) | 82 | cleanup_task (void *cls) |
83 | { | 83 | { |
84 | /* FIXME: do clean up here */ | 84 | /* FIXME: do clean up here */ |
85 | } | 85 | } |
@@ -94,9 +94,9 @@ cleanup_task(void *cls) | |||
94 | * @return @a c | 94 | * @return @a c |
95 | */ | 95 | */ |
96 | static void * | 96 | static void * |
97 | client_connect_cb(void *cls, | 97 | client_connect_cb (void *cls, |
98 | struct GNUNET_SERVICE_Client *c, | 98 | struct GNUNET_SERVICE_Client *c, |
99 | struct GNUNET_MQ_Handle *mq) | 99 | struct GNUNET_MQ_Handle *mq) |
100 | { | 100 | { |
101 | return c; | 101 | return c; |
102 | } | 102 | } |
@@ -110,11 +110,11 @@ client_connect_cb(void *cls, | |||
110 | * @param internal_cls should be equal to @a c | 110 | * @param internal_cls should be equal to @a c |
111 | */ | 111 | */ |
112 | static void | 112 | static void |
113 | client_disconnect_cb(void *cls, | 113 | client_disconnect_cb (void *cls, |
114 | struct GNUNET_SERVICE_Client *c, | 114 | struct GNUNET_SERVICE_Client *c, |
115 | void *internal_cls) | 115 | void *internal_cls) |
116 | { | 116 | { |
117 | GNUNET_assert(c == internal_cls); | 117 | GNUNET_assert (c == internal_cls); |
118 | } | 118 | } |
119 | 119 | ||
120 | 120 | ||
@@ -126,12 +126,12 @@ client_disconnect_cb(void *cls, | |||
126 | * @param service the initialized service | 126 | * @param service the initialized service |
127 | */ | 127 | */ |
128 | static void | 128 | static void |
129 | run(void *cls, | 129 | run (void *cls, |
130 | const struct GNUNET_CONFIGURATION_Handle *cfg, | 130 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
131 | struct GNUNET_SERVICE_Handle *service) | 131 | struct GNUNET_SERVICE_Handle *service) |
132 | { | 132 | { |
133 | /* FIXME: do setup here */ | 133 | /* FIXME: do setup here */ |
134 | GNUNET_SCHEDULER_add_shutdown(&cleanup_task, NULL); | 134 | GNUNET_SCHEDULER_add_shutdown (&cleanup_task, NULL); |
135 | } | 135 | } |
136 | 136 | ||
137 | 137 | ||
@@ -145,11 +145,11 @@ GNUNET_SERVICE_MAIN | |||
145 | &client_connect_cb, | 145 | &client_connect_cb, |
146 | &client_disconnect_cb, | 146 | &client_disconnect_cb, |
147 | NULL, | 147 | NULL, |
148 | GNUNET_MQ_hd_var_size(create, | 148 | GNUNET_MQ_hd_var_size (create, |
149 | GNUNET_MESSAGE_TYPE_AUCTION_CLIENT_CREATE, | 149 | GNUNET_MESSAGE_TYPE_AUCTION_CLIENT_CREATE, |
150 | struct GNUNET_AUCTION_ClientCreateMessage, | 150 | struct GNUNET_AUCTION_ClientCreateMessage, |
151 | NULL), | 151 | NULL), |
152 | GNUNET_MQ_handler_end()) | 152 | GNUNET_MQ_handler_end ()) |
153 | 153 | ||
154 | 154 | ||
155 | /* end of gnunet-service-auction.c */ | 155 | /* end of gnunet-service-auction.c */ |