Author: rizzo
Date: Sun Jul 22 12:11:26 2007
New Revision: 76347

URL: http://svn.digium.com/view/asterisk?view=rev&rev=76347
Log:
small merges from trunk, mostly formatting.

Modified:
    team/rizzo/astobj2/channels/chan_sip.c

Modified: team/rizzo/astobj2/channels/chan_sip.c
URL: 
http://svn.digium.com/view/asterisk/team/rizzo/astobj2/channels/chan_sip.c?view=diff&rev=76347&r1=76346&r2=76347
==============================================================================
--- team/rizzo/astobj2/channels/chan_sip.c (original)
+++ team/rizzo/astobj2/channels/chan_sip.c Sun Jul 22 12:11:26 2007
@@ -657,7 +657,7 @@
        int headers;            /*!< # of SIP Headers */
        int method;             /*!< Method of this request */
        int lines;              /*!< Body Content */
-       uint32_t flags;         /*!< SIP_PKT Flags for this packet */ /* XXX 
should be ast_flags */
+       unsigned int flags;     /*!< SIP_PKT Flags for this packet */ /* XXX 
should be ast_flags */
        unsigned int sdp_start; /*!< the line number where the SDP begins */
        unsigned int sdp_end;   /*!< the line number where the SDP ends */
        char *header[SIP_MAX_HEADERS];
@@ -6630,6 +6630,13 @@
                return -1;
        }
 
+       /* XXX the structure may be dirty from previous usage.
+        * Here we should state clearly how we should reinitialize it
+        * before using it.
+        * E.g. certainly the threadstorage should be left alone,
+        * but other thihngs such as flags etc. maybe need cleanup ?
+        */
+
        /* Initialize the bare minimum */
        p->method = intended_method;
 
@@ -7008,7 +7015,9 @@
 /*! \brief Set all IP media addresses for this call 
        \note called from add_sdp()
 */
-static void get_our_media_address(struct sip_pvt *p, int needvideo, struct 
sockaddr_in *sin, struct sockaddr_in *vsin, struct sockaddr_in *tsin, struct 
sockaddr_in *dest, struct sockaddr_in *vdest)
+static void get_our_media_address(struct sip_pvt *p, int needvideo,
+       struct sockaddr_in *sin, struct sockaddr_in *vsin, struct sockaddr_in 
*tsin,
+       struct sockaddr_in *dest, struct sockaddr_in *vdest)
 {
        /* First, get our address */
        ast_rtp_get_us(p->rtp, sin);
@@ -7136,6 +7145,7 @@
                if (debug) 
                        ast_verbose("Video is at %s port %d\n", 
ast_inet_ntoa(p->ourip.sin_addr), ntohs(vsin.sin_port));        
        }
+
         /* Check if we need text in this call */
        if((capability & AST_FORMAT_TEXT_MASK) && !ast_test_flag(&p->flags[1], 
SIP_PAGE2_NOTEXT)) {
                if (sipdebug_text)
@@ -7166,6 +7176,7 @@
 
                if (debug) /* XXX should I use tdest below ? */
                        ast_verbose("Text is at %s port %d\n", 
ast_inet_ntoa(p->ourip.sin_addr), ntohs(tsin.sin_port));
+
        }
 
        /* Start building generic SDP headers */
@@ -8615,8 +8626,7 @@
        if (contact)
                ast_copy_string(peer->fullcontact, contact, 
sizeof(peer->fullcontact));
 
-       if (option_verbose > 1)
-               ast_verbose(VERBOSE_PREFIX_3 "SIP Seeding peer from astdb: '%s' 
at [EMAIL PROTECTED]:%d for %d\n",
+       ast_debug(2, "SIP Seeding peer from astdb: '%s' at [EMAIL PROTECTED]:%d 
for %d\n",
                            peer->name, peer->username, ast_inet_ntoa(in), 
port, expiry);
 
        memset(&peer->addr, 0, sizeof(peer->addr));
@@ -11419,9 +11429,8 @@
                if (iterator->regtime.tv_sec) {
                        ast_localtime(&iterator->regtime, &tm, NULL);
                        ast_strftime(tmpdat, sizeof(tmpdat), "%a, %d %b %Y %T", 
&tm);
-               } else {
+               } else
                        tmpdat[0] = 0;
-               }
                ast_cli(fd, FORMAT, host, iterator->username, 
iterator->refresh, regstate2str(iterator->regstate), tmpdat);
                ASTOBJ_UNLOCK(iterator);
                counter++;
@@ -11658,7 +11667,7 @@
                ast_cli(arg->fd, FORMAT, ast_inet_ntoa(dst->sin_addr), 
                        S_OR(cur->username, S_OR(cur->cid_num, "(None)")),
                        cur->callid, 
-                       cur->ocseq, cur->icseq,         /* XXX note, these are 
uint32, do not fit well in 5 digits */
+                       cur->ocseq, cur->icseq,
                        ast_getformatname(cur->owner ? 
cur->owner->nativeformats : 0), 
                        ast_test_flag(&cur->flags[1], SIP_PAGE2_CALL_ONHOLD) ? 
"Yes" : "No",
                        cur->needdestroy ? "(d)" : "",


_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

svn-commits mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/svn-commits

Reply via email to