Commit f323e06a authored by rswindell's avatar rswindell
Browse files

Set smb last_error upon header parsing failure.

parent 27294966
...@@ -993,8 +993,10 @@ js_put_msg_header(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval * ...@@ -993,8 +993,10 @@ js_put_msg_header(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *
smb_freemsghdrmem(&msg); /* prevent duplicate header fields */ smb_freemsghdrmem(&msg); /* prevent duplicate header fields */
if(!parse_header_object(cx, p, hdr, &msg, TRUE)) if(!parse_header_object(cx, p, hdr, &msg, TRUE)) {
sprintf(p->smb.last_error,"Header parsing failure (required field missing?)");
break; break;
}
if(smb_putmsg(&(p->smb), &msg)!=0) if(smb_putmsg(&(p->smb), &msg)!=0)
break; break;
...@@ -1376,7 +1378,8 @@ js_save_msg(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) ...@@ -1376,7 +1378,8 @@ js_save_msg(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
if(i==rcpt_list_length) if(i==rcpt_list_length)
*rval = JSVAL_TRUE; /* success */ *rval = JSVAL_TRUE; /* success */
} }
} } else
sprintf(p->smb.last_error,"Header parsing failure (required field missing?)");
smb_freemsgmem(&msg); smb_freemsgmem(&msg);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment