-int POST_subscribe_iterator(void *cls, enum MHD_ValueKind kind, const char *key, const char *filename, const char *content_type, const char *transfer_encoding, const char *data, uint64_t off, size_t size) {
- struct subscribe_state *ss = cls;
-
- if (strncmp(key, "username", 9) == 0) {
- if (size > 32) size = 32;
- memcpy(ss->username, data, size);
- ss->username[size] = 0;
- } else if (strncmp(key, "to", 3) == 0) {
- if (size > 32) size = 32;
- memcpy(ss->to, data, size);
- ss->to[size] = 0;
- }
-
- return MHD_YES;
-}
-