]> code.citadel.org Git - citadel.git/commitdiff
* Minor change to the upload handler, to fix graphics uploads
authorArt Cancro <ajc@citadel.org>
Wed, 26 Dec 2001 23:11:25 +0000 (23:11 +0000)
committerArt Cancro <ajc@citadel.org>
Wed, 26 Dec 2001 23:11:25 +0000 (23:11 +0000)
webcit/ChangeLog
webcit/webcit.c

index db65c301dea91571c23b24aa9c38dc77e66930c1..6c0fb621057bbd285f9a8899c295ab6f854bbfc8 100644 (file)
@@ -1,4 +1,7 @@
 $Log$
+Revision 321.1  2001/12/26 23:11:25  ajc
+* Minor change to the upload handler, to fix graphics uploads
+
 Revision 321.0  2001/12/26 05:28:02  ajc
 * THIS IS 3.21
 
@@ -692,4 +695,3 @@ Sun Dec  6 19:50:55 EST 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
 
 1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
        * webserver.c: warning fix
-
index 57f5b422c2b21a11f1d50f773e55f30eef4e8bb8..142455fde94efe646db227b7173993bc4cd5b1d7 100644 (file)
@@ -634,12 +634,16 @@ void upload_handler(char *name, char *filename, char *partnum, char *disp,
        fprintf(stderr, "    type = %s\n", cbtype);
        fprintf(stderr, "  length = %ld\n", (long)length);
 
-       if ( (strlen(name) > 0) || (strlen(filename) > 0) ) {
+       if (length > 0) {
                WC->upload = malloc(length);
                if (WC->upload != NULL) {
                        WC->upload_length = length;
                        memcpy(WC->upload, content, length);
                }
+               else {
+                       fprintf(stderr, "malloc() failed: %s\n",
+                               strerror(errno));
+               }
        }
 }