[PATCH] Minor Issue when alt-host is set on EMI/UCP

"Vincent CHAVANIS" <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <129001c8af86$34e2b3d0$9600a8c0@VINCE>
Hi all,

Here is a minor fix to get the real name of the connection
when alt-host is set. (especially for the web status)
Without this patch, we will get the primary hostname
even if we are connected to the alt-host

Vincent.


diff -rauw /gateway-cvs/gw/smsc/smsc_emi.c /gateway/gw/smsc/smsc_emi.c
--- /gateway-cvs/gw/smsc/smsc_emi.c     2008-01-09 21:06:52.000000000 +0100
+++ /gateway/gw/smsc/smsc_emi.c 2008-05-06 15:50:52.000000000 +0200
@@ -364,6 +371,8 @@
        mutex_lock(conn->flow_mutex);
        conn->status = SMSCCONN_ACTIVE;
        conn->connect_time = time(NULL);
+        conn->name = octstr_format("EMI2:%S:%d:%S", privdata->host, 
privdata->port,
+                                   privdata->username ? privdata->username 
: octstr_imm("null"));
        mutex_unlock(conn->flow_mutex);
        bb_smscconn_connected(conn);
        return server;

--
Telemaque - 06560 SOPHIA-ANTIPOLIS - (FR)
Service Technique/Reseau - NOC
Direction du Developpement xMS+
http://www.telemaque.fr/
[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.