Commit 07ffa797 authored by rswindell's avatar rswindell
Browse files

smb_open_sub() will now create the msgbase if hasn't been created yet.

parent 9391ac78
......@@ -198,15 +198,6 @@ bool sbbs_t::email(int usernumber, const char *top, const char *subj, long mode,
return(false);
}
if(smb_fgetlength(smb.shd_fp)<1) { /* Create it if it doesn't exist */
if((i=smb_create(&smb))!=0) {
smb_close(&smb);
smb_stack(&smb,SMB_STACK_POP);
errormsg(WHERE,ERR_CREATE,smb.file,i,smb.last_error);
return(false);
}
}
if((i=smb_locksmbhdr(&smb))!=0) {
smb_close(&smb);
smb_stack(&smb,SMB_STACK_POP);
......
......@@ -112,12 +112,6 @@ js_open(JSContext *cx, uintN argc, jsval *arglist)
JS_RESUMEREQUEST(cx, rc);
return JS_TRUE;
}
if(filelength(fileno(p->smb.shd_fp)) < 1) { /* MsgBase doesn't exist yet, create it */
if((p->smb_result = smb_create(&(p->smb))) != SMB_SUCCESS) {
JS_RESUMEREQUEST(cx, rc);
return JS_TRUE;
}
}
JS_RESUMEREQUEST(cx, rc);
JS_SET_RVAL(cx, arglist, JSVAL_TRUE);
......
......@@ -58,9 +58,6 @@ int msgbase_open(scfg_t* cfg, smb_t* smb, unsigned int subnum, int* storage, lon
if(smb->status.max_crcs==0) /* no CRC checking means no body text dupe checking */
*dupechk_hashes&=~(1<<SMB_HASH_SOURCE_BODY);
if(filelength(fileno(smb->shd_fp)) < 1) /* MsgBase doesn't exist yet, create it */
i=smb_create(smb);
*storage=smb_storage_mode(cfg, smb);
return i;
......
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