Fixed trace bugs.
[lcr.git] / vbox.cpp
index 419c226..158a113 100644 (file)
--- a/vbox.cpp
+++ b/vbox.cpp
@@ -45,10 +45,10 @@ VBoxPort::~VBoxPort()
 }
 
 
-static void vbox_trace_header(class VBoxPort *vbox, char *message, int direction)
+static void vbox_trace_header(class VBoxPort *vbox, const char *message, int direction)
 {
        /* init trace with given values */
-       start_trace(0,
+       start_trace(-1,
                    NULL,
                    vbox?numberrize_callerinfo(vbox->p_callerinfo.id, vbox->p_callerinfo.ntype, options.national, options.international):NULL,
                    vbox?vbox->p_dialinginfo.id:NULL,
@@ -65,7 +65,7 @@ static void vbox_trace_header(class VBoxPort *vbox, char *message, int direction
 int VBoxPort::handler(void)
 {
        struct lcr_msg  *message;
-       unsigned long   tosend;
+       unsigned int    tosend;
        unsigned char   buffer[ISDN_TRANSMIT];
        time_t          currenttime;
        class Endpoint  *epoint;
@@ -107,7 +107,7 @@ int VBoxPort::handler(void)
        }
        
        /* calculate the number of bytes */
-       tosend = (unsigned long)((now_d-p_vbox_audio_start)*8000) - p_vbox_audio_transferred;
+       tosend = (unsigned int)((now_d-p_vbox_audio_start)*8000) - p_vbox_audio_transferred;
 
        /* wait for more */
        if (tosend < sizeof(buffer))
@@ -189,7 +189,7 @@ int VBoxPort::handler(void)
 /*
  * endpoint sends messages to the vbox port
  */
-int VBoxPort::message_epoint(unsigned long epoint_id, int message_id, union parameter *param)
+int VBoxPort::message_epoint(unsigned int epoint_id, int message_id, union parameter *param)
 {
        struct lcr_msg *message;
        class Endpoint *epoint;