]> code.citadel.org Git - citadel.git/blobdiff - webcit/webcit.c
* Brought over message reading and entry functions from old WebCit
[citadel.git] / webcit / webcit.c
index e0c731829afb5e9b355339ff6c750a29b19ee67f..f828791adf730da2b01346e63f5e53fecd0a6e40 100644 (file)
@@ -102,10 +102,10 @@ void addurls(char *url) {
                for (a=0; a<b; ++a) ++ptr;
                strcpy(ptr,"");
                
-               u->url_data = malloc(strlen(up));
+               u->url_data = malloc(strlen(up)+1);
                strcpy(u->url_data, up);
+               u->url_data[b] = 0;
                unescape_input(u->url_data);
-
                up = ptr;
                ++up;
                }
@@ -571,6 +571,14 @@ fclose(fp);
                readloop("readfwd");
                }
 
+       else if (!strcasecmp(action, "display_enter")) {
+               display_enter();
+               }
+
+       else if (!strcasecmp(action, "post")) {
+               post_message();
+               }
+
        /* When all else fails... */
        else {
                printf("HTTP/1.0 200 OK\n");