Revision: 16076
Author: [email protected]
Date: Tue Dec 28 00:59:26 2010
Log: [No log message]
http://code.google.com/p/mobicents/source/detail?r=16076

Modified:
/trunk/protocols/ss7/hardware/dahdi/java/src/main/java/org/mobicents/ss7/hardware/dahdi/oam/DahdiLink.java /trunk/protocols/ss7/hardware/dahdi/java/src/main/java/org/mobicents/ss7/hardware/dahdi/oam/DahdiLinkset.java /trunk/protocols/ss7/hardware/dahdi/java/src/main/java/org/mobicents/ss7/hardware/dahdi/oam/DahdiLinksetFactory.java

=======================================
--- /trunk/protocols/ss7/hardware/dahdi/java/src/main/java/org/mobicents/ss7/hardware/dahdi/oam/DahdiLink.java Mon Dec 27 22:52:52 2010 +++ /trunk/protocols/ss7/hardware/dahdi/java/src/main/java/org/mobicents/ss7/hardware/dahdi/oam/DahdiLink.java Tue Dec 28 00:59:26 2010
@@ -100,7 +100,7 @@
         if (this.state == LinkState.AVAILABLE) {
             throw new Exception(LinkOAMMessages.LINK_ALREADY_ACTIVE);
         }
-
+
         // Add check that all parameters are set before initializing the
         // Link. Else send error message
         if (this.span == -1 || this.code == -1 || this.channelID == -1) {
@@ -110,13 +110,23 @@
         this.mode = LinkMode.CONFIGURED;

         this.init();
+
+        this.state = LinkState.UNAVAILABLE;
     }

     /**
      * Management Operations
      */
     public void deactivate() throws Exception {
-        throw new Exception(LinkOAMMessages.NOT_IMPLEMENTED);
+        if(this.mode == LinkMode.UNCONFIGURED){
+            throw new Exception(LinkOAMMessages.LINK_ALREADY_DEACTIVE);
+        }
+
+        this.mtp2.stop();
+
+
+        //TODO : SHouldn't this come from Mtp2Listener?
+        this.state = LinkState.SHUTDOWN;
     }

protected static final XMLFormat<DahdiLink> DAHDI_LINK_XML = new XMLFormat<DahdiLink>(
=======================================
--- /trunk/protocols/ss7/hardware/dahdi/java/src/main/java/org/mobicents/ss7/hardware/dahdi/oam/DahdiLinkset.java Mon Dec 27 22:52:52 2010 +++ /trunk/protocols/ss7/hardware/dahdi/java/src/main/java/org/mobicents/ss7/hardware/dahdi/oam/DahdiLinkset.java Tue Dec 28 00:59:26 2010
@@ -142,6 +142,7 @@
             if (value.getMode() == LinkMode.CONFIGURED) {
                 this.mode = LinksetMode.CONFIGURED;
                 this.init();
+                this.state = LinksetState.UNAVAILABLE;
                 return;
             }

=======================================
--- /trunk/protocols/ss7/hardware/dahdi/java/src/main/java/org/mobicents/ss7/hardware/dahdi/oam/DahdiLinksetFactory.java Mon Dec 27 09:29:37 2010 +++ /trunk/protocols/ss7/hardware/dahdi/java/src/main/java/org/mobicents/ss7/hardware/dahdi/oam/DahdiLinksetFactory.java Tue Dec 28 00:59:26 2010
@@ -39,7 +39,7 @@

         int opc = Integer.parseInt(options[4]);

-        if (options[5].compareTo("dpc") != 0) {
+        if (options[5].compareTo("apc") != 0) {
             throw new Exception(LinkOAMMessages.INVALID_COMMAND);
         }

Reply via email to