]> git.pld-linux.org Git - packages/cvs-nserver.git/blob - cvs-nserver-dblshutdown.patch
- rel.21 - added CVSSERVER variable to pserver and nserver script. Without
[packages/cvs-nserver.git] / cvs-nserver-dblshutdown.patch
1 --- cvs-nserver-1.11.1.52/src/server.c.orig     2005-02-16 00:11:57.460798401 +0100
2 +++ cvs-nserver-1.11.1.52/src/server.c  2005-02-26 20:25:07.156114626 +0100
3 @@ -3274,10 +3274,13 @@
4         buf_flush (buf_to_net, 1);
5         buf_shutdown (protocol_inbuf);
6         buf_free (protocol_inbuf);
7 +       protocol_inbuf = NULL;
8         buf_shutdown (stderrbuf);
9         buf_free (stderrbuf);
10 +       stderrbuf = NULL;
11         buf_shutdown (stdoutbuf);
12         buf_free (stdoutbuf);
13 +       stdoutbuf = NULL;
14      }
15  
16      if (errs)
17 @@ -4818,12 +4821,19 @@
18             error (0, status, "shutting down buffer from client");
19             buf_flush (buf_to_net, 1);
20         }
21 +       buf_free (buf_from_net);
22 +       buf_from_net = NULL;
23      }
24  
25      if (dont_delete_temp)
26      {
27         if (buf_to_net != NULL)
28 +       {
29             (void) buf_shutdown (buf_to_net);
30 +           buf_free (buf_to_net);
31 +           buf_to_net = NULL;
32 +           error_use_protocol = 0;
33 +       }
34         return;
35      }
36  
37 @@ -4921,7 +4931,13 @@
38      noexec = save_noexec;
39  
40      if (buf_to_net != NULL)
41 +    {
42 +       (void) buf_flush (buf_to_net, 1);
43         (void) buf_shutdown (buf_to_net);
44 +       buf_free (buf_to_net);
45 +       buf_to_net = NULL;
46 +       error_use_protocol = 0;
47 +    }
48  }
49  
50  int server_active = 0;
51 @@ -5063,25 +5079,6 @@
52         }
53      }
54  
55 -#ifdef SIGABRT
56 -    (void) SIG_register (SIGABRT, server_cleanup);
57 -#endif
58 -#ifdef SIGHUP
59 -    (void) SIG_register (SIGHUP, server_cleanup);
60 -#endif
61 -#ifdef SIGINT
62 -    (void) SIG_register (SIGINT, server_cleanup);
63 -#endif
64 -#ifdef SIGQUIT
65 -    (void) SIG_register (SIGQUIT, server_cleanup);
66 -#endif
67 -#ifdef SIGPIPE
68 -    (void) SIG_register (SIGPIPE, server_cleanup);
69 -#endif
70 -#ifdef SIGTERM
71 -    (void) SIG_register (SIGTERM, server_cleanup);
72 -#endif
73 -
74      /* Now initialize our argument vector (for arguments from the client).  */
75  
76      /* Small for testing.  */
77 @@ -5664,12 +5661,12 @@
78      if (len == 0)
79         len = strlen (str);
80  #ifdef SERVER_SUPPORT
81 -    if (error_use_protocol)
82 +    if (error_use_protocol && buf_to_net != NULL)
83      {
84         buf_output (saved_output, str, len);
85         buf_copy_lines (buf_to_net, saved_output, 'M');
86      }
87 -    else if (server_active)
88 +    else if (server_active && protocol != NULL)
89      {
90         buf_output (saved_output, str, len);
91         buf_copy_lines (protocol, saved_output, 'M');
This page took 0.074327 seconds and 3 git commands to generate.