<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[Freeswitch-trunk][16146] </title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<div id="header">FreeSWITCH Subversion</div>
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://fisheye.freeswitch.org/changelog/FreeSWITCH?cs=16146">16146</a></dd>
<dt>Author</dt> <dd>jmesquita</dd>
<dt>Date</dt> <dd>2010-01-04 22:57:25 -0600 (Mon, 04 Jan 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>More work on qsettings. Still get problem when expanding a template with no variables.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#freeswitchtrunkfscommconfevent_socketconfxml">freeswitch/trunk/fscomm/conf/event_socket.conf.xml</a></li>
<li><a href="#freeswitchtrunkfscommconffreeswitchxml">freeswitch/trunk/fscomm/conf/freeswitch.xml</a></li>
<li><a href="#freeswitchtrunkfscommconfportaudioconfxml">freeswitch/trunk/fscomm/conf/portaudio.conf.xml</a></li>
<li><a href="#freeswitchtrunkfscommfshostcpp">freeswitch/trunk/fscomm/fshost.cpp</a></li>
<li><a href="#freeswitchtrunkfscommmainwindowui">freeswitch/trunk/fscomm/mainwindow.ui</a></li>
<li><a href="#freeswitchtrunkfscommmod_qsettingsmod_qsettingscpp">freeswitch/trunk/fscomm/mod_qsettings/mod_qsettings.cpp</a></li>
<li><a href="#freeswitchtrunkfscommresourcessplashpng">freeswitch/trunk/fscomm/resources/splash.png</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="freeswitchtrunkfscommconfevent_socketconfxml"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/fscomm/conf/event_socket.conf.xml (16145 => 16146)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/fscomm/conf/event_socket.conf.xml        2010-01-04 22:07:20 UTC (rev 16145)
+++ freeswitch/trunk/fscomm/conf/event_socket.conf.xml        2010-01-05 04:57:25 UTC (rev 16146)
</span><span class="lines">@@ -1,3 +1,5 @@
</span><ins>+&lt;document type=&quot;freeswitch/xml&quot;&gt;
+    &lt;section name=&quot;configuration&quot;&gt;
</ins><span class="cx"> &lt;configuration name=&quot;event_socket.conf&quot; description=&quot;Socket Client&quot;&gt;
</span><span class="cx">           &lt;settings&gt;
</span><span class="cx">                 &lt;param name=&quot;nat-map&quot; value=&quot;false&quot;/&gt;
</span><span class="lines">@@ -5,4 +7,6 @@
</span><span class="cx">                 &lt;param name=&quot;listen-port&quot; value=&quot;8021&quot;/&gt;
</span><span class="cx">                 &lt;param name=&quot;password&quot; value=&quot;ClueCon&quot;/&gt;
</span><span class="cx">           &lt;/settings&gt;
</span><del>-&lt;/configuration&gt;
</del><ins>+    &lt;/configuration&gt;
+  &lt;/section&gt;
+&lt;/document&gt;
</ins></span></pre></div>
<a id="freeswitchtrunkfscommconffreeswitchxml"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/fscomm/conf/freeswitch.xml (16145 => 16146)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/fscomm/conf/freeswitch.xml        2010-01-04 22:07:20 UTC (rev 16145)
+++ freeswitch/trunk/fscomm/conf/freeswitch.xml        2010-01-05 04:57:25 UTC (rev 16146)
</span><span class="lines">@@ -49,7 +49,7 @@
</span><span class="cx">     &lt;/configuration&gt;
</span><span class="cx"> 
</span><span class="cx">     &lt;configuration name=&quot;qsettings.conf&quot; description=&quot;configures our mod_qsettings&quot;&gt;
</span><del>-                &lt;bindings value=&quot;dialplan&quot; /&gt;
</del><ins>+                &lt;bindings value=&quot;configuration&quot; /&gt;
</ins><span class="cx">     &lt;/configuration&gt;
</span><span class="cx"> 
</span><span class="cx">     &lt;configuration name=&quot;local_stream.conf&quot; description=&quot;stream files from local dir&quot;&gt;
</span><span class="lines">@@ -83,7 +83,6 @@
</span><span class="cx">         &lt;load module=&quot;mod_logfile&quot;/&gt;
</span><span class="cx">         &lt;load module=&quot;mod_enum&quot;/&gt;
</span><span class="cx">         &lt;load module=&quot;mod_cdr_csv&quot;/&gt;
</span><del>-        &lt;load module=&quot;mod_portaudio&quot;/&gt;
</del><span class="cx">         &lt;load module=&quot;mod_sofia&quot;/&gt;
</span><span class="cx">         &lt;load module=&quot;mod_loopback&quot;/&gt;
</span><span class="cx">         &lt;load module=&quot;mod_commands&quot;/&gt;
</span></span></pre></div>
<a id="freeswitchtrunkfscommconfportaudioconfxml"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/fscomm/conf/portaudio.conf.xml (16145 => 16146)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/fscomm/conf/portaudio.conf.xml        2010-01-04 22:07:20 UTC (rev 16145)
+++ freeswitch/trunk/fscomm/conf/portaudio.conf.xml        2010-01-05 04:57:25 UTC (rev 16146)
</span><span class="lines">@@ -1,17 +1,22 @@
</span><del>-&lt;configuration name=&quot;portaudio.conf&quot; description=&quot;Soundcard Endpoint&quot;&gt;
-    &lt;settings&gt;
-        &lt;param name=&quot;indev&quot; value=&quot;${indev}&quot;/&gt;
-        &lt;!-- device to use for output --&gt;
-        &lt;param name=&quot;outdev&quot; value=&quot;${outdev}&quot;/&gt;
-        &lt;!--&lt;param name=&quot;ringdev&quot; value=&quot;${ringdev}&quot;/&gt;--&gt;
-        &lt;param name=&quot;ring-file&quot; value=&quot;${ring-file}&quot;/&gt;
-        &lt;param name=&quot;ring-interval&quot; value=&quot;${ring-interval}&quot;/&gt;
-        &lt;param name=&quot;hold-file&quot; value=&quot;$${hold_music}&quot;/&gt;
-        &lt;!--&lt;param name=&quot;timer-name&quot; value=&quot;soft&quot;/&gt;--&gt;
-        &lt;param name=&quot;dialplan&quot; value=&quot;XML&quot;/&gt;
-        &lt;param name=&quot;cid-name&quot; value=&quot;$${outbound_caller_name}&quot;/&gt;
-        &lt;param name=&quot;cid-num&quot; value=&quot;$${outbound_caller_number}&quot;/&gt;
-        &lt;param name=&quot;sample-rate&quot; value=&quot;48000&quot;/&gt;
-        &lt;param name=&quot;codec-ms&quot; value=&quot;10&quot;/&gt;
-    &lt;/settings&gt;
-&lt;/configuration&gt;
</del><ins>+&lt;document type=&quot;freeswitch/xml&quot;&gt;
+    &lt;section name=&quot;configuration&quot;&gt;
+        &lt;configuration name=&quot;portaudio.conf&quot; description=&quot;Soundcard Endpoint&quot;&gt;
+            &lt;settings&gt;
+                &lt;param name=&quot;indev&quot; value=&quot;${indev}&quot;/&gt;
+                &lt;!-- device to use for output --&gt;
+                &lt;param name=&quot;outdev&quot; value=&quot;${outdev}&quot;/&gt;
+                &lt;!--&lt;param name=&quot;ringdev&quot; value=&quot;${ringdev}&quot;/&gt;--&gt;
+                &lt;param name=&quot;ring-file&quot; value=&quot;${ring-file}&quot;/&gt;
+                &lt;param name=&quot;ring-interval&quot; value=&quot;${ring-interval}&quot;/&gt;
+                &lt;param name=&quot;hold-file&quot; value=&quot;$${hold_music}&quot;/&gt;
+                &lt;!--&lt;param name=&quot;timer-name&quot; value=&quot;soft&quot;/&gt;--&gt;
+                &lt;param name=&quot;dialplan&quot; value=&quot;XML&quot;/&gt;
+                &lt;param name=&quot;cid-name&quot; value=&quot;$${outbound_caller_name}&quot;/&gt;
+                &lt;param name=&quot;cid-num&quot; value=&quot;$${outbound_caller_number}&quot;/&gt;
+                &lt;param name=&quot;sample-rate&quot; value=&quot;48000&quot;/&gt;
+                &lt;param name=&quot;codec-ms&quot; value=&quot;10&quot;/&gt;
+            &lt;/settings&gt;
+        &lt;/configuration&gt;
+    &lt;/section&gt;
+&lt;/document&gt;
+
</ins></span></pre></div>
<a id="freeswitchtrunkfscommfshostcpp"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/fscomm/fshost.cpp (16145 => 16146)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/fscomm/fshost.cpp        2010-01-04 22:07:20 UTC (rev 16145)
+++ freeswitch/trunk/fscomm/fshost.cpp        2010-01-05 04:57:25 UTC (rev 16146)
</span><span class="lines">@@ -130,6 +130,7 @@
</span><span class="cx">     }
</span><span class="cx">     QString res;
</span><span class="cx">     sendCmd(&quot;load&quot;, &quot;mod_event_socket&quot;, &amp;res);
</span><ins>+    sendCmd(&quot;load&quot;, &quot;mod_portaudio&quot;, &amp;res);
</ins><span class="cx">     emit ready();
</span><span class="cx">     /* Go into the runtime loop. If the argument is true, this basically sets runtime.running = 1 and loops while that is set
</span><span class="cx">      * If its false, it initializes the libedit for the console, then does the same thing
</span></span></pre></div>
<a id="freeswitchtrunkfscommmainwindowui"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/fscomm/mainwindow.ui (16145 => 16146)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/fscomm/mainwindow.ui        2010-01-04 22:07:20 UTC (rev 16145)
+++ freeswitch/trunk/fscomm/mainwindow.ui        2010-01-05 04:57:25 UTC (rev 16146)
</span><span class="lines">@@ -6,8 +6,8 @@
</span><span class="cx">    &lt;rect&gt;
</span><span class="cx">     &lt;x&gt;0&lt;/x&gt;
</span><span class="cx">     &lt;y&gt;0&lt;/y&gt;
</span><del>-    &lt;width&gt;580&lt;/width&gt;
-    &lt;height&gt;563&lt;/height&gt;
</del><ins>+    &lt;width&gt;670&lt;/width&gt;
+    &lt;height&gt;541&lt;/height&gt;
</ins><span class="cx">    &lt;/rect&gt;
</span><span class="cx">   &lt;/property&gt;
</span><span class="cx">   &lt;property name=&quot;windowTitle&quot;&gt;
</span><span class="lines">@@ -310,8 +310,8 @@
</span><span class="cx">     &lt;rect&gt;
</span><span class="cx">      &lt;x&gt;0&lt;/x&gt;
</span><span class="cx">      &lt;y&gt;0&lt;/y&gt;
</span><del>-     &lt;width&gt;580&lt;/width&gt;
-     &lt;height&gt;22&lt;/height&gt;
</del><ins>+     &lt;width&gt;670&lt;/width&gt;
+     &lt;height&gt;24&lt;/height&gt;
</ins><span class="cx">     &lt;/rect&gt;
</span><span class="cx">    &lt;/property&gt;
</span><span class="cx">    &lt;widget class=&quot;QMenu&quot; name=&quot;menu_File&quot;&gt;
</span></span></pre></div>
<a id="freeswitchtrunkfscommmod_qsettingsmod_qsettingscpp"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/fscomm/mod_qsettings/mod_qsettings.cpp (16145 => 16146)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/fscomm/mod_qsettings/mod_qsettings.cpp        2010-01-04 22:07:20 UTC (rev 16145)
+++ freeswitch/trunk/fscomm/mod_qsettings/mod_qsettings.cpp        2010-01-05 04:57:25 UTC (rev 16146)
</span><span class="lines">@@ -45,19 +45,25 @@
</span><span class="cx">     switch_event_create_plain(&amp;e, SWITCH_EVENT_REQUEST_PARAMS);
</span><span class="cx">     switch_assert(e);
</span><span class="cx"> 
</span><del>-    QFile tmplFile(QString(&quot;%1/templates/%2.xml&quot;).arg(QApplication::applicationDirPath(),tmpl));
-
-    if (!tmplFile.exists()) {
</del><ins>+    if (QFile::exists(QString(&quot;%1/.fscomm/templates/%2.xml&quot;).arg(QDir::homePath(),tmpl))) {
</ins><span class="cx">         switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO,
</span><del>-                          &quot;Template %s.xml, doesn't exist on directory, falling back to embedded template.\n&quot;,
</del><ins>+                          &quot;Using template %s.xml on .fscomm/.\n&quot;,
</ins><span class="cx">                           tmpl.toAscii().constData());
</span><del>-        tmplFile.setFileName(QString(&quot;:/confs/%1.xml&quot;).arg(tmpl));
-        return NULL;
</del><span class="cx">     }
</span><ins>+    else if(QFile::exists(QString(&quot;:/confs/%1.xml&quot;).arg(tmpl)))
+    {
+        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO,
+                          &quot;Template %s.xml, doesn't exist on directory, copying embedded template.\n&quot;,
+                          tmpl.toAscii().constData());
+        QString dest = QString(&quot;%1/.fscomm/templates/%2.xml&quot;).arg(QDir::homePath(),tmpl);
+        QString orig = QString(&quot;:/confs/%1.xml&quot;).arg(tmpl);
+        QFile::copy(orig, dest);
+    }
</ins><span class="cx"> 
</span><del>-    if (tmplFile.open(QIODevice::ReadOnly | QIODevice::Text))
</del><ins>+    QFile tmplFile(QString(&quot;%1/.fscomm/templates/%2.xml&quot;).arg(QDir::homePath(),tmpl));
+    if (!tmplFile.open(QIODevice::ReadOnly | QIODevice::Text))
</ins><span class="cx">     {
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Template %s could not be read.!\n&quot;, tmpl.toAscii().constData());
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Template %s could not be read!\n&quot;, tmpl.toAscii().constData());
</ins><span class="cx">         return NULL;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -72,6 +78,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     char *res = switch_event_expand_headers(e, tmplContents.toAscii().constData());
</span><ins>+    switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Template %s as follows:\n%s&quot;, tmpl.toAscii().constData(), res);
</ins><span class="cx">     switch_safe_free(e);
</span><span class="cx">     return switch_xml_parse_str(res, strlen(res));
</span><span class="cx"> }
</span><span class="lines">@@ -81,6 +88,8 @@
</span><span class="cx"> {
</span><span class="cx">     XMLBinding *binding = (XMLBinding *) user_data;
</span><span class="cx"> 
</span><ins>+    switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;We are being requested -&gt; section: %s | tag_name: %s | key_name: %s | key_value: %s!\n&quot;,
+                      section, tag_name, key_name, key_value);
</ins><span class="cx">     if (!binding) {
</span><span class="cx">         return NULL;
</span><span class="cx">     }
</span></span></pre></div>
<a id="freeswitchtrunkfscommresourcessplashpng"></a>
<div class="binary"><h4>Modified: freeswitch/trunk/fscomm/resources/splash.png</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
</div>
<div id="footer">See you at ClueCon</div>

</body>
</html>