StrBuf *Buf;
StrBuf *Data = NULL;
const char *bptr;
- int Done = 0;
char uid_from_headers[256];
char mime_partnum[256];
char mime_filename[256];
struct vnote *vnote_from_body = NULL;
int vnote_inline = 0; /* 1 = MSG4 gave us a text/x-vnote top level */
+ uid_from_headers[0] = '\0';
relevant_partnum[0] = '\0';
serv_printf("MSG4 %ld", msgnum); /* we need the mime headers */
Buf = NewStrBuf();
FreeStrBuf (&Buf);
return NULL;
}
- while ((StrBuf_ServGetln(Buf)>=0) && !Done) {
+ while ((StrBuf_ServGetln(Buf)>=0)) {
if ( (StrLength(Buf)==3) &&
!strcmp(ChrPtr(Buf), "000")) {
- Done = 1;
break;
}
bptr = ChrPtr(Buf);
if (!havebstr("note_uid")) {
begin_ajax_response();
- wprintf("Received ajax_update_note() request without a note UID.");
+ wc_printf("Received ajax_update_note() request without a note UID.");
end_ajax_response();
return;
}
serv_getln(buf, sizeof buf);
if (buf[0] != '2') {
begin_ajax_response();
- wprintf("Cannot find message containing vNote with the requested uid!");
+ wc_printf("Cannot find message containing vNote with the requested uid!");
end_ajax_response();
return;
}
serv_printf("DELE %d", msgnum);
serv_getln(buf, sizeof buf);
begin_ajax_response();
- wprintf("%s", buf);
+ wc_printf("%s", buf);
end_ajax_response();
return;
}
v = vnote_new_from_msg(msgnum, 0);
if (!v) {
begin_ajax_response();
- wprintf("Cannot locate a vNote within message %d\n", msgnum);
+ wc_printf("Cannot locate a vNote within message %d\n", msgnum);
end_ajax_response();
return;
}
vnote_free(v);
}
- readloop(readfwd);
+ readloop(readfwd, eUseDefault);
}
{
strcpy(cmd, "MSGS ALL");
Stat->maxmsgs = 32767;
- wprintf("<div id=\"new_notes_here\"></div>\n");
+ wc_printf("<div id=\"new_notes_here\"></div>\n");
return 200;
}
VIEW_NOTES,
notes_GetParamsGetServerCall,
NULL,
+ NULL,
notes_LoadMsgFromServer,
NULL,
notes_Cleanup);
- WebcitAddUrlHandler(HKEY("add_new_note"), add_new_note, 0);
- WebcitAddUrlHandler(HKEY("ajax_update_note"), ajax_update_note, 0);
+ WebcitAddUrlHandler(HKEY("add_new_note"), "", 0, add_new_note, 0);
+ WebcitAddUrlHandler(HKEY("ajax_update_note"), "", 0, ajax_update_note, 0);
RegisterNamespace("VNOTE:POS:LEFT", 0, 0, tmpl_vcard_put_posleft, NULL, CTX_VNOTE);
RegisterNamespace("VNOTE:POS:TOP", 0, 0, tmpl_vcard_put_postop, NULL, CTX_VNOTE);