voltando a versao de n aberturas e fechamentos de sockets

Dependencies:   EthernetInterface NTPClient mbed-rtos_old mbed

Fork of header_main_public by VZTECH

Revision:
14:22a35f575502
Parent:
13:ae278302dffe
--- a/call_box.cpp	Tue Sep 16 15:09:11 2014 +0000
+++ b/call_box.cpp	Tue Sep 16 21:02:37 2014 +0000
@@ -51,9 +51,11 @@
     
         delete( sip );
         this->sip = NULL;
+        debug_msg(" Registrado %d", ext );
     }else{
         debug_msg(" Registrando %d", ext )
         sip->registry();
+        debug_msg(" Registrado %d", ext );
     }
 }
 
@@ -134,7 +136,6 @@
         sip->send_bye();
         
         delete( sip );
-        
         sip = NULL;
     }else{
         sip->send_bye();
@@ -145,4 +146,12 @@
     if( this->sip != NULL ) delete( this->sip );
     
     this->sip = new Sip( ext, port );
+}
+
+void Call_Box::set_sip_status( int status ){
+    if( this->sip != NULL ){
+        this->sip->status = status;
+    }else{
+        debug_msg("Sem objeto sip vinculado");
+    }        
 }
\ No newline at end of file