[Citadel Development] (no subject)

2011-09-07 Thread dothebart


in sendcommand.c we have:
/* * make sure only one copy of sendcommand runs at a time, using lock files */int set_lockfile(void){ FILE *lfp; int onppid; int rv; if ((lfp = fopen(LOCKFILE, "r")) != NULL) { rv = fscanf(lfp, "%d", &onppid); fclose(lfp); if (!kill(onppid, 0) || errno == EPERM) return 1; } lfp = fopen(LOCKFILE, "w"); fprintf(lfp, "%ld\n", (long) getpid()); fclose(lfp); return (0);}void remove_lockfile(void){ unlink(LOCKFILE);}
and its not used; remove this?




[Citadel Development] (no subject)

2011-09-07 Thread dothebart


in other things, do we use MOVF?
from what I read in cmd_movf, I think its bugged & flowed.
/* this is a crude method of copying the file description */ snprintf(buf, sizeof buf, "cat ./files/%s/filedir |grep \"%s\" >>./files/%s/filedir", CC->room.QRdirname, filename, qrbuf.QRdirname); rv = system(buf);
we create an immutable dependency here which most probably neither of our package request; and the file isn't removed from original directory index
We also have another similar place:
wiki_rev_callback() :
fp = popen("patch -f -s -p0 -r /dev/null >/dev/null 2>/dev/null", "w");
which also just works by error if the system actualy has patch installed.
on all of these system calls we should at least expose their respective commands to configure, so it can detect (or choose another) from the system.
for example gnu grep is known to be locale aware; which will result in errors if you give it an ISO LANG environment (through citservers environment) , and it gets UTF8 chars.




[Citadel Development] (no subject)

2011-09-07 Thread dothebart



Wed Sep 07 2011 08:13:07 EDT from   IGnatius T Foobar @ Uncensored 

I believe we set our limit to 1024 characters in order to match other protocols such as SMTP/POP which have their line limits set in the same place.  (No strbuf here please; doing so would create a cascading set of bugs that would set us back by a year or more.)


how would I do a StrBuf in .js? ;-)
do we shape the command line in webcit? else one might get fancy bugs when partial commands go through...
i'd be in to 5xx if the .js didn't sanify the commandline (which I now did, have a look at...
http://code.citadel.org/?p=citadel.git&a=commit&h=01a0fdb8d91b441953247f9d31b633888f90c2a1
)




[Citadel Development] (no subject)

2011-09-07 Thread IGnatius T Foobar
I believe we set our limit to 1024 characters in order to match other protocols
such as SMTP/POP which have their line limits set in the same place. 
  
 (No strbuf here please; doing so would create a cascading set of bugs that
would set us back by a year or more.)