aboutsummaryrefslogtreecommitdiff
path: root/imap-send.c
Commit message (Collapse)AuthorAge
* Rename imap-send's internal info/warn functions.Shawn O. Pearce2006-12-21
| | | | | | | | | | | | | | | Because I am about to introduce a global warn() function (much like the global error function) this global declaration would conflict with the one supplied by imap-send. Further since imap-send's warn function output depends on its Quiet setting we cannot simply remove its internal definition and use the forthcoming global one. So refactor warn() -> imap_warn() and info() -> imap_info() (the latter was done just to be consistent in naming). Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* simplify inclusion of system header files.Junio C Hamano2006-12-20
| | | | | | | | | | | | | | | | | | | | This is a mechanical clean-up of the way *.c files include system header files. (1) sources under compat/, platform sha-1 implementations, and xdelta code are exempt from the following rules; (2) the first #include must be "git-compat-util.h" or one of our own header file that includes it first (e.g. config.h, builtin.h, pkt-line.h); (3) system headers that are included in "git-compat-util.h" need not be included in individual C source files. (4) "git-compat-util.h" does not have to include subsystem specific header files (e.g. expat.h). Signed-off-by: Junio C Hamano <junkio@cox.net>
* Use memmove instead of memcpy for overlapping areasEdgar Toernig2006-10-30
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-imap-send: Strip smtp From_ header from imap message.v1.4.3Markus Amsler2006-10-18
| | | | | | | | | Cyrus imap refuses messages with a 'From ' Header. [jc: Mike McCormack says this is fine with Courier as well.] Signed-off-by: Markus Amsler <markus.amsler@oribi.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Trace into a file or an open fd and refactor tracing code.Christian Couder2006-09-02
| | | | | | | | | | | | | | | | | | | | | | | If GIT_TRACE is set to an absolute path (starting with a '/' character), we interpret this as a file path and we trace into it. Also if GIT_TRACE is set to an integer value greater than 1 and lower than 10, we interpret this as an open fd value and we trace into it. Note that this behavior is not compatible with the previous one. We also trace whole messages using one write(2) call to make sure messages from processes do net get mixed up in the middle. This patch makes it possible to get trace information when running "make test". Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Replace uses of strdup with xstrdup.Shawn Pearce2006-09-02
| | | | | | | | | | | | | | | | Like xmalloc and xrealloc xstrdup dies with a useful message if the native strdup() implementation returns NULL rather than a valid pointer. I just tried to use xstrdup in new code and found it to be missing. However I expected it to be present as xmalloc and xrealloc are already commonly used throughout the code. [jc: removed the part that deals with last_XXX, which I am finding more and more dubious these days.] Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Make some strings constTimo Hirvonen2006-06-28
| | | | | Signed-off-by: Timo Hirvonen <tihirvon@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Change types used in bitfields to be `int's.Florian Forster2006-06-18
| | | | | | | | | According to ANSI C99 bitfields are only defined for `signed int' and `unsigned int'. This patch corrects the bitfield in the `msg_data_t' type from `imap-send.c'. Signed-off-by: Florian Forster <octo@verplant.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* check for error return from fork()Paul T Darga2006-06-08
| | | | | | | Trivial fixup for fork() callsites which do not check for errors. Signed-off-by: Paul T Darga <pdarga@umich.edu> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Avoid a crash if realloc returns a different pointer.Mike McCormack2006-04-05
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* Avoid a divide by zero if there's no messages to send.Mike McCormack2006-04-05
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* Fix sparse warnings about usage of 0 instead of NULLRene Scharfe2006-04-02
| | | | | Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <junkio@cox.net>
* fix imap-send for OSXRandal L. Schwartz2006-03-15
| | | | | | This patch works... I've been using it to stay current. Signed-off-by: Junio C Hamano <junkio@cox.net>
* imap-send: Add missing #include for macosxJohannes Schindelin2006-03-12
| | | | | | | There is a compile error without that. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* imap-send: cleanup execl() call to use NULL sentinel instead of 0Marco Roeland2006-03-11
| | | | | | | | | | | | | Some versions of gcc check that calls to the exec() family have the proper sentinel for variadic calls. This should be (char *) NULL according to the man page. Although for all other purposes the 0 is equivalent, gcc nevertheless does emit a warning for 0 and not for NULL. This also makes the usage consistent throughout git. The whitespace in function calls throughout imap-send.c has its own style, so I left it that way. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Add git-imap-send, derived from isync 1.0.1.Mike McCormack2006-03-10
git-imap-send drops a patch series generated by git-format-patch into an IMAP folder. This allows patch submitters to send patches through their own mail program. git-imap-send uses the following values from the GIT repository configuration: The target IMAP folder: [imap] Folder = "INBOX.Drafts" A command to open an ssh tunnel to the imap mail server. [imap] Tunnel = "ssh -q user@imap.server.com /usr/bin/imapd ./Maildir 2> /dev/null" [imap] Host = imap.server.com User = bob Password = pwd Port = 143