Diff for /embedaddon/quagga/lib/smux.c between versions 1.1.1.3 and 1.1.1.4

version 1.1.1.3, 2013/07/21 23:54:39 version 1.1.1.4, 2016/11/02 10:09:11
Line 78  struct subtree Line 78  struct subtree
 enum smux_event {SMUX_SCHEDULE, SMUX_CONNECT, SMUX_READ};  enum smux_event {SMUX_SCHEDULE, SMUX_CONNECT, SMUX_READ};
   
 void smux_event (enum smux_event, int);  void smux_event (enum smux_event, int);
   
   
   
 /* SMUX socket. */  /* SMUX socket. */
 int smux_sock = -1;  int smux_sock = -1;
   
Line 113  static struct cmd_node smux_node = Line 113  static struct cmd_node smux_node =
 };  };
   
 /* thread master */  /* thread master */
static struct thread_master *master;static struct thread_master *smux_master;
 static int  static int
 oid_compare_part (oid *o1, int o1_len, oid *o2, int o2_len)  oid_compare_part (oid *o1, int o1_len, oid *o2, int o2_len)
 {  {
Line 132  oid_compare_part (oid *o1, int o1_len, oid *o2, int o2 Line 132  oid_compare_part (oid *o1, int o1_len, oid *o2, int o2
   
   return 0;    return 0;
 }  }
 static void  static void
 smux_oid_dump (const char *prefix, const oid *oid, size_t oid_len)  smux_oid_dump (const char *prefix, const oid *oid, size_t oid_len)
 {  {
Line 1230  smux_stop (void) Line 1230  smux_stop (void)
       smux_sock = -1;        smux_sock = -1;
     }      }
 }  }
   
   
   
   
 void  void
 smux_event (enum smux_event event, int sock)  smux_event (enum smux_event event, int sock)
 {  {
   switch (event)    switch (event)
     {      {
     case SMUX_SCHEDULE:      case SMUX_SCHEDULE:
      smux_connect_thread = thread_add_event (master, smux_connect, NULL, 0);      smux_connect_thread = thread_add_event (smux_master, smux_connect, NULL, 0);
       break;        break;
     case SMUX_CONNECT:      case SMUX_CONNECT:
      smux_connect_thread = thread_add_timer (master, smux_connect, NULL, 10);      smux_connect_thread = thread_add_timer (smux_master, smux_connect, NULL, 10);
       break;        break;
     case SMUX_READ:      case SMUX_READ:
      smux_read_thread = thread_add_read (master, smux_read, NULL, sock);      smux_read_thread = thread_add_read (smux_master, smux_read, NULL, sock);
       break;        break;
     default:      default:
       break;        break;
     }      }
 }  }
 static int  static int
 smux_str2oid (const char *str, oid *oid, size_t *oid_len)  smux_str2oid (const char *str, oid *oid, size_t *oid_len)
 {  {
Line 1474  void Line 1474  void
 smux_init (struct thread_master *tm)  smux_init (struct thread_master *tm)
 {  {
   /* copy callers thread master */    /* copy callers thread master */
  master = tm;  smux_master = tm;
       
   /* Make MIB tree. */    /* Make MIB tree. */
   treelist = list_new();    treelist = list_new();

Removed from v.1.1.1.3  
changed lines
  Added in v.1.1.1.4


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>