13-master_process_handling.dpatch

Henrique de Moraes Holschuh hmh at debian.org
Sat Jul 3 02:53:42 UTC 2010


On Fri, 02 Jul 2010, Patrick Goetz wrote:
> OK, first small coding error that I've been able to find in a patch
> so far.  I'm putting it out there for comment unless I'm missing
> something.
> 
> in 13-master_process_handling.dpatch,
> 
>   +int read_msg(int fd, struct notify_message *msg)
>   +{
>   +    ssize_t r;
>   +    size_t off = 0;
>   +    int s = sizeof(struct notify_message);
> 
> should be
> ------ --
> 
>   +int read_msg(int fd, struct notify_message *msg)
>   +{
>   +    ssize_t r;
>   +    size_t off = 0;
>   +    size_t s = sizeof(struct notify_message);
> 
> Any comments before I change this in the patch?

Depends on the rest of read_msg(), doesn't it?  Let me look at the full
patch...

It should be ssize_t (note the double "s"), but int is safe. 

I think that code is mine, from 10 years ago.  Damn, looks ugly, it can
probably be done better :)  I might rework it.

Don't send patch 12 and 13 upstream just yet.  Let me go over them
again, I already have at least a proper header for them explaining what
they [attempt to] do, salvaged from the changelogs from the Cyrus 2.1
packages...  some have links to bug reports, etc.

I also have some metadata for patch 08, basically we want those
shutdown() and close() because it helps reduce the time the sockets
spend on TIME_WAIT.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh



More information about the Pkg-Cyrus-imapd-Debian-devel mailing list