]> git.proxmox.com Git - mirror_frr.git/blobdiff - ripd/rip_debug.c
Revert "lib: introduce a read-write lock for northbound configurations"
[mirror_frr.git] / ripd / rip_debug.c
index 492d036991b9ece51d21a6cda35b7d34b9e0d39f..3356d99c2ab8651b522ec61a870c575c663a7e21 100644 (file)
@@ -27,12 +27,12 @@ unsigned long rip_debug_event = 0;
 unsigned long rip_debug_packet = 0;
 unsigned long rip_debug_zebra = 0;
 
-DEFUN (show_debugging_rip,
-       show_debugging_rip_cmd,
-       "show debugging rip",
-       SHOW_STR
-       DEBUG_STR
-       RIP_STR)
+DEFUN_NOSH (show_debugging_rip,
+           show_debugging_rip_cmd,
+           "show debugging [rip]",
+           SHOW_STR
+           DEBUG_STR
+           RIP_STR)
 {
        vty_out(vty, "RIP debugging status:\n");
 
@@ -93,13 +93,9 @@ DEFUN (debug_rip_packet_direct,
 {
        int idx_recv_send = 3;
        rip_debug_packet |= RIP_DEBUG_PACKET;
-       if (strncmp("send", argv[idx_recv_send]->arg,
-                   strlen(argv[idx_recv_send]->arg))
-           == 0)
+       if (strcmp("send", argv[idx_recv_send]->text) == 0)
                rip_debug_packet |= RIP_DEBUG_SEND;
-       if (strncmp("recv", argv[idx_recv_send]->arg,
-                   strlen(argv[idx_recv_send]->arg))
-           == 0)
+       if (strcmp("recv", argv[idx_recv_send]->text) == 0)
                rip_debug_packet |= RIP_DEBUG_RECV;
        return CMD_SUCCESS;
 }
@@ -150,16 +146,12 @@ DEFUN (no_debug_rip_packet_direct,
        "RIP option set for send packet\n")
 {
        int idx_recv_send = 4;
-       if (strncmp("send", argv[idx_recv_send]->arg,
-                   strlen(argv[idx_recv_send]->arg))
-           == 0) {
+       if (strcmp("send", argv[idx_recv_send]->text) == 0) {
                if (IS_RIP_DEBUG_RECV)
                        rip_debug_packet &= ~RIP_DEBUG_SEND;
                else
                        rip_debug_packet = 0;
-       } else if (strncmp("recv", argv[idx_recv_send]->arg,
-                          strlen(argv[idx_recv_send]->arg))
-                  == 0) {
+       } else if (strcmp("recv", argv[idx_recv_send]->text) == 0) {
                if (IS_RIP_DEBUG_SEND)
                        rip_debug_packet &= ~RIP_DEBUG_RECV;
                else
@@ -212,13 +204,6 @@ static int config_write_debug(struct vty *vty)
        return write;
 }
 
-void rip_debug_reset(void)
-{
-       rip_debug_event = 0;
-       rip_debug_packet = 0;
-       rip_debug_zebra = 0;
-}
-
 void rip_debug_init(void)
 {
        rip_debug_event = 0;