]> git.ipfire.org Git - people/ms/mstpd.git/commitdiff
remove notification commands
authordv1tas <dv1tas@fbe50366-0c72-4402-a84b-5d246361dba7>
Sat, 17 Dec 2011 19:48:34 +0000 (19:48 +0000)
committerdv1tas <dv1tas@fbe50366-0c72-4402-a84b-5d246361dba7>
Sat, 17 Dec 2011 19:48:34 +0000 (19:48 +0000)
git-svn-id: svn://svn.code.sf.net/p/mstpd/code/trunk@23 fbe50366-0c72-4402-a84b-5d246361dba7

bridge-stp
bridge_track.c
ctl_functions.h
ctl_main.c
ctl_socket_server.c

index 77e2d2e755c4c63b28190cbb0d3f323d9f2d56b4..d9a8b8822b158ec1ffeb8411d612467896b739c7 100755 (executable)
@@ -44,12 +44,12 @@ case $2 in
         checkpid $pid_file || exit 1
         for b in $MSTP_BRIDGES; do
             if [ "$bridge" == "$b" ]; then
-                exec /sbin/mstpctl notify-daemon-that-stp-is-on $bridge
+                exit 0
             fi
         done
         exit 1 ;;
     stop)
-        exec /sbin/mstpctl notify-daemon-that-stp-is-off $bridge
+        exit 0
         ;;
     *)
         echo "Unknown action:" $2
index 75cce58da1eb616a84281d86385c3320902dc065..c2a11e0cbe4fa3dda79cb55c10c3b9ceb6866475 100644 (file)
@@ -839,13 +839,3 @@ int CTL_set_fids2mstids(int br_index, __u16 *fids2mstids)
     CTL_CHECK_BRIDGE;
     return MSTP_IN_set_all_fids2mstids(br, fids2mstids) ? 0 : -1;
 }
-
-int CTL_stp_mode_notification(int br_index, bool on)
-{
-    int br_flags;
-    CTL_CHECK_BRIDGE;
-    if(0 > (br_flags = get_flags(br->sysdeps.name)))
-        return br_flags;
-    set_br_up(br, !!(br_flags & IFF_UP), on);
-    return 0;
-}
index ea2d7e6a63e08d9959d6c90d591ff9a658e0a495..5b09a209e44dc032864b77624c3aee4f0c803add 100644 (file)
@@ -448,23 +448,6 @@ struct set_fids2mstids_OUT
 #define set_fids2mstids_CALL (in->br_index, in->fids2mstids)
 CTL_DECLARE(set_fids2mstids);
 
-/* stp_mode_notification */
-#define CMD_CODE_stp_mode_notification  (122 | RESPONSE_FIRST_HANDLE_LATER)
-#define stp_mode_notification_ARGS (int br_index, bool on)
-struct stp_mode_notification_IN
-{
-    int br_index;
-    bool on;
-};
-struct stp_mode_notification_OUT
-{
-};
-#define stp_mode_notification_COPY_IN  ({ in->br_index = br_index; \
-                                          in->on = on; })
-#define stp_mode_notification_COPY_OUT ({ (void)0; })
-#define stp_mode_notification_CALL (in->br_index, in->on)
-CTL_DECLARE(stp_mode_notification);
-
 /* General case part in ctl command server switch */
 #define SERVER_MESSAGE_CASE(name)                            \
     case CMD_CODE_ ## name : do                              \
index ac54a246fd723a333819bec6c608d1440685ea8f..4411bbb4080a06f1ed21a0a3370f5cb46d70aaf4 100644 (file)
@@ -1191,23 +1191,6 @@ static int cmd_setfid2mstid(int argc, char *const *argv)
     return CTL_set_fid2mstid(br_index, fid, mstid);
 }
 
-static int cmd_stp_mode_notification(int argc, char *const *argv, bool on)
-{
-    int br_index;
-    /* Because this command has special handling,
-     * argc was not checked earlier
-     */
-    if(2 > argc)
-    {
-        fprintf(stderr,
-                "Incorrect number of arguments for notification command\n");
-        exit(1);
-    }
-    if(0 > (br_index = get_index(argv[1], "bridge")))
-        return br_index;
-    return CTL_stp_mode_notification(br_index, on);
-}
-
 struct command
 {
     int nargs;
@@ -1370,12 +1353,6 @@ int main(int argc, char *const *argv)
     argv += optind;
     if(NULL == (cmd = command_lookup(argv[0])))
     {
-        /* Two special commands not intended for interactive use */
-        if(!strcmp(argv[0], "notify-daemon-that-stp-is-on"))
-            return cmd_stp_mode_notification(argc, argv, true);
-        if(!strcmp(argv[0], "notify-daemon-that-stp-is-off"))
-            return cmd_stp_mode_notification(argc, argv, false);
-
         fprintf(stderr, "never heard of command [%s]\n", argv[0]);
         goto help;
     }
@@ -1417,7 +1394,6 @@ CLIENT_SIDE_FUNCTION(set_vid2fid)
 CLIENT_SIDE_FUNCTION(set_fid2mstid)
 CLIENT_SIDE_FUNCTION(set_vids2fids)
 CLIENT_SIDE_FUNCTION(set_fids2mstids)
-CLIENT_SIDE_FUNCTION(stp_mode_notification)
 
 /*********************** Logging *********************/
 
index 4650c9ca5840d94276332ab016240d91b61494cf..105ccbb6b13f2d181e079d4b561365dd4e9c6045 100644 (file)
@@ -82,7 +82,6 @@ static int handle_message(int cmd, void *inbuf, int lin,
         SERVER_MESSAGE_CASE(set_fid2mstid);
         SERVER_MESSAGE_CASE(set_vids2fids);
         SERVER_MESSAGE_CASE(set_fids2mstids);
-        SERVER_MESSAGE_CASE(stp_mode_notification);
 
         default:
             ERROR("CTL: Unknown command %d", cmd);