aboutsummaryrefslogtreecommitdiff
path: root/src/auction/gnunet-service-auction.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-10-05 15:09:28 +0200
committerChristian Grothoff <christian@grothoff.org>2019-10-05 15:09:28 +0200
commitc4e9ba925ffd758aaa3feee2ccfc0b76f26fe207 (patch)
treecac3ce030d77b4cbe7c7dc62ed58cfe6d24f73e1 /src/auction/gnunet-service-auction.c
parentfbb71d527c7d6babf269a8fefce1db291b9f7068 (diff)
downloadgnunet-c4e9ba925ffd758aaa3feee2ccfc0b76f26fe207.tar.gz
gnunet-c4e9ba925ffd758aaa3feee2ccfc0b76f26fe207.zip
global reindent, now with uncrustify hook enabled
Diffstat (limited to 'src/auction/gnunet-service-auction.c')
-rw-r--r--src/auction/gnunet-service-auction.c46
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 */
38static int 38static int
39check_create(void *cls, const struct GNUNET_AUCTION_ClientCreateMessage *msg) 39check_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 */
52static void 52static void
53handle_create(void *cls, const struct GNUNET_AUCTION_ClientCreateMessage *msg) 53handle_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 */
81static void 81static void
82cleanup_task(void *cls) 82cleanup_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 */
96static void * 96static void *
97client_connect_cb(void *cls, 97client_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 */
112static void 112static void
113client_disconnect_cb(void *cls, 113client_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 */
128static void 128static void
129run(void *cls, 129run (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 */