[Devel] [ openser-Patches-1614047 ] Display the "Socket" field as <proto>:<IP>:<port> for usrloc

SourceForge.net noreply at sourceforge.net
Fri Dec 22 14:01:29 CET 2006


Patches item #1614047, was opened at 2006-12-12 17:42
Message generated for change (Settings changed) made by bogdan_iancu
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743022&aid=1614047&group_id=139143

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: ver devel
>Status: Closed
Resolution: Accepted
Priority: 5
Private: No
Submitted By: Ovidiu Sas (osas)
Assigned to: Bogdan (bogdan_iancu)
Summary: Display the "Socket" field as <proto>:<IP>:<port> for usrloc

Initial Comment:
The "Socket" field in  the output of the 'openserctl ul show' doesn't show the proto of the socket.  Here's a  patch that will print the <proto>:<IP>:<port> instead of the <IP>:<port> for the "Socket" field:

$ cvs diff -nu ucontact.c
Index: ucontact.c
===================================================================
RCS file: /cvsroot/openser/sip-server/modules/usrloc/ucontact.c,v
retrieving revision 1.20
diff -n -u -r1.20 ucontact.c
cvs diff: conflicting specifications of output style
--- ucontact.c	21 Nov 2006 18:22:12 -0000	1.20
+++ ucontact.c	12 Dec 2006 15:32:47 -0000
@@ -162,7 +162,7 @@
 	fprintf(_f, "Flags     : %u\n", _c->flags);
 	if (_c->sock) {
 		fprintf(_f, "Sock      : %.*s:%d (%p)\n",
-			_c->sock->address_str.len,_c->sock->address_str.s,
+			_c->sock->sock_str.len,_c->sock->sock_str.s,
 			_c->sock->port_no,_c->sock);
 	} else {
 		fprintf(_f, "Sock      : none (null)\n");


----------------------------------------------------------------------

Comment By: Bogdan (bogdan_iancu)
Date: 2006-12-22 15:01

Message:
Logged In: YES 
user_id=1275325
Originator: NO

Hi Ovidiu,

I applied the final patch - thanks for the contribution.

regards,
bogdan

----------------------------------------------------------------------

Comment By: Ovidiu Sas (osas)
Date: 2006-12-12 20:19

Message:
Logged In: YES 
user_id=1395524
Originator: YES

Opps ... the previous patch was printing the port twice.
patch updated:

# cvs diff -Nu ucontact.c
Index: ucontact.c
===================================================================
RCS file: /cvsroot/openser/sip-server/modules/usrloc/ucontact.c,v
retrieving revision 1.17
diff -u -r1.17 ucontact.c
--- ucontact.c	3 Jul 2006 08:54:38 -0000	1.17
+++ ucontact.c	12 Dec 2006 17:02:02 -0000
@@ -161,9 +161,8 @@
 	fprintf(_f, "State     : %s\n", st);
 	fprintf(_f, "Flags     : %u\n", _c->flags);
 	if (_c->sock) {
-		fprintf(_f, "Sock      : %.*s:%d (%p)\n",
-			_c->sock->address_str.len,_c->sock->address_str.s,
-			_c->sock->port_no,_c->sock);
+		fprintf(_f, "Sock      : %.*s (%p)\n",
+			_c->sock->sock_str.len,_c->sock->sock_str.s,_c->sock);
 	} else {
 		fprintf(_f, "Sock      : none (null)\n");
 	}

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743022&aid=1614047&group_id=139143



More information about the Devel mailing list