OK, here's a pseudo-diff a what I'm looking at doing in the rw_del_esmtp() function:
- char *c; + char *c, *r;
host.ptr=strchr(c, '@')+1; + r = fetch_smtproutes(host.ptr); + if (r) host.ptr=strtok(r,"/, "); host.len=strlen(host.ptr);
(*delfunc)(rwi, &host, &addr); free(c); + free(r);
So it checks for a route to this host in the esmtproutes file and if it finds one it sets host.ptr to that instead of the host itself. Am I going to break anything else doing this? I'm also assuming that it's OK to 'free(r)' at the end. Is that a valid assumption?
Correct for the last part, at least. You also have to be careful to clean up after yourself in any new code, so that you won't leak memory or any other resources.
------------------------------------------------------- This SF.net email is sponsored by: SlickEdit Inc. Develop an edge. The most comprehensive and flexible code editor you can use. Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial. www.slickedit.com/sourceforge _______________________________________________ courier-users mailing list [EMAIL PROTECTED] Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users
