}
-// remove this when finished
-void diag_hexdump_str(char *str, char *desc) {
- printf("%s\n", desc);
- FILE *fp = popen("hexdump -C", "w");
- if (fp) {
- fwrite(str, strlen(str), 1, fp);
- pclose(fp);
- }
-}
-
-
// Client is requesting a mailbox summary of the current room
void json_mailbox(struct http_transaction *h, struct ctdlsession *c) {
char buf[1024];
JsonObjectAppend(jmsg, NewJsonPlainString(HKEY("author"), field, -1));
extract_token(field, buf, 4, '|', sizeof field);
utf8ify_rfc822_string(field);
- diag_hexdump_str(field, "address");
JsonObjectAppend(jmsg, NewJsonPlainString(HKEY("addr"), field, -1));
extract_token(field, buf, 5, '|', sizeof field);
utf8ify_rfc822_string(field);