Commit 8e1f5a53 8e1f5a53201184ff42348f9d4cf230f765d1441d by Sergey Poznyakoff

Bugfixes.

* examples/echosrv.c: Fix typo.
* libmailutils/sockaddr/url.c: Likewise.
* mh/mhn.c: Likewise.
* mh/folder.c (roll_back): Fix conditional.
* THANKS: Update.
1 parent e1e999de
...@@ -21,6 +21,7 @@ Jordi Mallach <jordi@sindominio.net> ...@@ -21,6 +21,7 @@ Jordi Mallach <jordi@sindominio.net>
21 Kidong Lee <briankdlee@yahoo.com> 21 Kidong Lee <briankdlee@yahoo.com>
22 Kostas Zorbadelos <kzorba@otenet.gr> 22 Kostas Zorbadelos <kzorba@otenet.gr>
23 Matthew Whitworth <matthew@okcomputer.org> 23 Matthew Whitworth <matthew@okcomputer.org>
24 maks <maksqwe1@ukr.net>
24 Neil R. Ormos <ormos@ormos.org> 25 Neil R. Ormos <ormos@ormos.org>
25 Olivier Bornet <Olivier.Bornet@smartdata.ch> 26 Olivier Bornet <Olivier.Bornet@smartdata.ch>
26 Robby Villegas <robby.villegas@gmail.com> 27 Robby Villegas <robby.villegas@gmail.com>
......
...@@ -140,7 +140,7 @@ create_server (char *arg) ...@@ -140,7 +140,7 @@ create_server (char *arg)
140 exit (1); 140 exit (1);
141 } 141 }
142 142
143 memset (&hints, sizeof(hints), 0); 143 memset (&hints, 0, sizeof(hints));
144 hints.flags = MU_AH_PASSIVE; 144 hints.flags = MU_AH_PASSIVE;
145 hints.socktype = SOCK_STREAM; 145 hints.socktype = SOCK_STREAM;
146 hints.protocol = IPPROTO_TCP; 146 hints.protocol = IPPROTO_TCP;
......
...@@ -62,7 +62,7 @@ mu_sockaddr_from_url (struct mu_sockaddr **retval, mu_url_t url, ...@@ -62,7 +62,7 @@ mu_sockaddr_from_url (struct mu_sockaddr **retval, mu_url_t url,
62 memcpy (&hints, mh, sizeof (hints)); 62 memcpy (&hints, mh, sizeof (hints));
63 else 63 else
64 { 64 {
65 memset (&hints, sizeof(hints), 0); 65 memset (&hints, 0, sizeof(hints));
66 hints.family = AF_UNSPEC; 66 hints.family = AF_UNSPEC;
67 hints.socktype = SOCK_STREAM; 67 hints.socktype = SOCK_STREAM;
68 hints.protocol = IPPROTO_TCP; 68 hints.protocol = IPPROTO_TCP;
......
...@@ -720,9 +720,9 @@ roll_back (const char *folder_name, struct pack_tab *pack_tab, size_t i) ...@@ -720,9 +720,9 @@ roll_back (const char *folder_name, struct pack_tab *pack_tab, size_t i)
720 if (i == 0) 720 if (i == 0)
721 return; 721 return;
722 722
723 start = i - 1; 723 start = --i;
724 mu_error (_("rolling back changes...")); 724 mu_error (_("rolling back changes..."));
725 while (--i >= 0) 725 do
726 if (pack_rename (pack_tab + i, 1)) 726 if (pack_rename (pack_tab + i, 1))
727 { 727 {
728 mu_error (_("CRITICAL ERROR: Folder `%s' left in an inconsistent state, because an error\n" 728 mu_error (_("CRITICAL ERROR: Folder `%s' left in an inconsistent state, because an error\n"
...@@ -736,6 +736,7 @@ roll_back (const char *folder_name, struct pack_tab *pack_tab, size_t i) ...@@ -736,6 +736,7 @@ roll_back (const char *folder_name, struct pack_tab *pack_tab, size_t i)
736 mu_error (_("You will have to fix it manually.")); 736 mu_error (_("You will have to fix it manually."));
737 exit (1); 737 exit (1);
738 } 738 }
739 while (i-- > 0);
739 mu_error (_("folder `%s' restored successfully"), folder_name); 740 mu_error (_("folder `%s' restored successfully"), folder_name);
740 } 741 }
741 742
......
...@@ -2808,7 +2808,7 @@ mhn_header (mu_message_t msg, mu_message_t omsg) ...@@ -2808,7 +2808,7 @@ mhn_header (mu_message_t msg, mu_message_t omsg)
2808 mu_message_get_part (omsg, 1, &part); 2808 mu_message_get_part (omsg, 1, &part);
2809 else 2809 else
2810 part = omsg; 2810 part = omsg;
2811 if (part); 2811 if (part)
2812 { 2812 {
2813 mu_header_t parthdr = NULL; 2813 mu_header_t parthdr = NULL;
2814 char *typestr, *typeargs; 2814 char *typestr, *typeargs;
......