[BACK]Return to dispatch.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Diff for /src/usr.bin/ssh/dispatch.c between version 1.2 and 1.2.2.2

version 1.2, 2000/04/14 10:30:31 version 1.2.2.2, 2000/11/08 21:30:45
Line 9 
Line 9 
  * 2. Redistributions in binary form must reproduce the above copyright   * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the   *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.   *    documentation and/or other materials provided with the distribution.
  * 3. All advertising materials mentioning features or use of this software  
  *    must display the following acknowledgement:  
  *      This product includes software developed by Markus Friedl.  
  * 4. The name of the author may not be used to endorse or promote products  
  *    derived from this software without specific prior written permission.  
  *   *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR   * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES   * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
Line 27 
Line 22 
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.   * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */   */
 #include "includes.h"  #include "includes.h"
 RCSID("$Id$");  RCSID("$OpenBSD$");
 #include "ssh.h"  #include "ssh.h"
 #include "dispatch.h"  #include "dispatch.h"
 #include "packet.h"  #include "packet.h"
Line 38 
Line 33 
 dispatch_fn *dispatch[DISPATCH_MAX];  dispatch_fn *dispatch[DISPATCH_MAX];
   
 void  void
 dispatch_protocol_error(int type, int plen)  dispatch_protocol_error(int type, int plen, void *ctxt)
 {  {
         error("Hm, dispatch protocol error: type %d plen %d", type, plen);          error("Hm, dispatch protocol error: type %d plen %d", type, plen);
 }  }
Line 55 
Line 50 
         dispatch[type] = fn;          dispatch[type] = fn;
 }  }
 void  void
 dispatch_run(int mode, int *done)  dispatch_run(int mode, int *done, void *ctxt)
 {  {
         for (;;) {          for (;;) {
                 int plen;                  int plen;
Line 69 
Line 64 
                                 return;                                  return;
                 }                  }
                 if (type > 0 && type < DISPATCH_MAX && dispatch[type] != NULL)                  if (type > 0 && type < DISPATCH_MAX && dispatch[type] != NULL)
                         (*dispatch[type])(type, plen);                          (*dispatch[type])(type, plen, ctxt);
                 else                  else
                         packet_disconnect("protocol error: rcvd type %d", type);                          packet_disconnect("protocol error: rcvd type %d", type);
                 if (done != NULL && *done)                  if (done != NULL && *done)

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.2.2.2