<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/124312/">https://git.reviewboard.kde.org/r/124312/</a>
     </td>
    </tr>
   </table>
   <br />










<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On July 11th, 2015, 2 a.m. CEST, <b>Aleix Pol Gonzalez</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  


<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="https://git.reviewboard.kde.org/r/124312/diff/1/?file=383919#file383919line54" style="color: black; font-weight: bold; text-decoration: underline;">core/backends/lan/lanlinkprovider.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">54</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="n">pairingHandler</span> <span class="o">=</span> <span class="k">new</span> <span class="n">LanPairingHandler</span><span class="p">();</span></pre></td>
  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Is it leaking?</p></pre>
 </blockquote>



 <p>On July 14th, 2015, 2:15 p.m. CEST, <b>Vineet Garg</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Since there is one pairing handler per link provider, it should not leak.</p></pre>
 </blockquote>







</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Just delete on desctruction then.</p></pre>
<br />

<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On July 11th, 2015, 2 a.m. CEST, <b>Aleix Pol Gonzalez</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  


<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="https://git.reviewboard.kde.org/r/124312/diff/1/?file=383934#file383934line476" style="color: black; font-weight: bold; text-decoration: underline;">core/device.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">void Device::setAsPaired()</pre></td>

  </tr>
 </tbody>



 
 

 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">457</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="n">KdeConnectConfig</span><span class="o">::</span><span class="n">instance</span><span class="p">()</span><span class="o">-></span><span class="n">addTrustedDevice</span><span class="p">(</span><span class="n">id</span><span class="p">(),</span> <span class="n">name</span><span class="p">(),</span> <span class="n">type2str</span><span class="p">(</span><span class="n">m_deviceType</span><span class="p">),</span> <span class="n">m_publicKey</span><span class="p">.</span><span class="n">toPEM</span><span class="p">());</span></pre></td>
    <th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">474</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="n">KdeConnectConfig</span><span class="o">::</span><span class="n">instance</span><span class="p">()</span><span class="o">-></span><span class="n">addTrustedDevice</span><span class="p">(</span><span class="n">id</span><span class="p">(),</span> <span class="n">name</span><span class="p">(),</span> <span class="n">type2str</span><span class="p">(</span><span class="n">m_deviceType</span><span class="p">),</span> <span class="n">m_publicKey</span><span class="p">.</span><span class="n">toPEM</span><span class="p">()<span class="hl">,</span></span><span class="hl"> </span><span class="n"><span class="hl">QString</span></span><span class="p"><span class="hl">(</span></span><span class="n"><span class="hl">m_certificate</span></span><span class="p"><span class="hl">.</span></span><span class="n"><span class="hl">toPem</span></span><span class="p"><span class="hl">())</span>);</span></pre></td>
  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Remove the QString() constructor, it's not correct. Is it because toPem returns a QByteArray?</p></pre>
 </blockquote>



 <p>On July 14th, 2015, 2:37 p.m. CEST, <b>Vineet Garg</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Yes, toPem here return QByteArray</p></pre>
 </blockquote>







</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Then use QString::fromLocal8Bit or ::fromLatin1.</p></pre>
<br />




<p>- Aleix</p>


<br />
<p>On July 14th, 2015, 2:15 p.m. CEST, Vineet Garg wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: 1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
 <tr>
  <td>

<div>Review request for kdeconnect.</div>
<div>By Vineet Garg.</div>


<p style="color: grey;"><i>Updated July 14, 2015, 2:15 p.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
kdeconnect-kde
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><ul style="padding: 0;text-rendering: inherit;margin: 0 0 0 1em;line-height: inherit;white-space: normal;">
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">Similar to Android version, this SSL implementation supports old version also.</li>
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">Certificate is generated when public key is generated using QCA, but used as QSslCertificate because QSslSocket don't like QCA certificate.</li>
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">A new server is written overriding QTcpServer for setting socket descriptor to QSslSocket.</li>
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">QSslSocket works as plain socket to transfer identity package and then either uses encrypted mode or normal mode according to the received package.</li>
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">If connetion is to be on SSL, new link is only added after successful handshake.</li>
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">Certificate is embedded into identity package on start of encrypted mode and then set in device using it.</li>
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">PairingHandler is added like in Android version so that each LinkProvider manage pairing according to its own rules.</li>
</ul>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">P.S. : Uploaded the patch with some debug statements, will comment out them.</p></pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><ul style="padding: 0;text-rendering: inherit;margin: 0 0 0 1em;line-height: inherit;white-space: normal;">
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">Working fine, tested using connection to Android devices.</li>
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">Pairing handler needs to be tested using two LinkProvider, working fine with one, but there be some problems with two LinkProviders simultaneouly.</li>
</ul></pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>core/backends/lan/server.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>core/backends/lan/server.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>core/backends/lan/lanpairinghandler.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>core/backends/lan/lanpairinghandler.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>core/backends/lan/lanlinkprovider.h <span style="color: grey">(b379434)</span></li>

 <li>core/backends/lan/lanlinkprovider.cpp <span style="color: grey">(f5d2b22)</span></li>

 <li>core/backends/lan/landevicelink.cpp <span style="color: grey">(0987057)</span></li>

 <li>core/backends/lan/landevicelink.h <span style="color: grey">(7d31881)</span></li>

 <li>core/backends/lan/downloadjob.cpp <span style="color: grey">(bba2e98)</span></li>

 <li>core/backends/lan/downloadjob.h <span style="color: grey">(eeeab07)</span></li>

 <li>core/backends/lan/CMakeLists.txt <span style="color: grey">(7c5be38)</span></li>

 <li>core/CMakeLists.txt <span style="color: grey">(dd8fedb)</span></li>

 <li>core/backends/lan/socketlinereader.h <span style="color: grey">(b3be55a)</span></li>

 <li>core/backends/lan/socketlinereader.cpp <span style="color: grey">(a6bd85e)</span></li>

 <li>core/backends/lan/uploadjob.h <span style="color: grey">(12b6f7e)</span></li>

 <li>core/backends/lan/uploadjob.cpp <span style="color: grey">(b0d35fc)</span></li>

 <li>core/backends/linkprovider.h <span style="color: grey">(f4fc309)</span></li>

 <li>core/backends/pairinghandler.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>core/backends/pairinghandler.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>core/daemon.h <span style="color: grey">(674ca01)</span></li>

 <li>core/daemon.cpp <span style="color: grey">(af4c67b)</span></li>

 <li>core/device.h <span style="color: grey">(03f528c)</span></li>

 <li>core/device.cpp <span style="color: grey">(c2dc609)</span></li>

 <li>core/kdeconnectconfig.h <span style="color: grey">(af6c6df)</span></li>

 <li>core/kdeconnectconfig.cpp <span style="color: grey">(919505c)</span></li>

 <li>core/networkpackage.h <span style="color: grey">(6a0bf9c)</span></li>

 <li>core/networkpackage.cpp <span style="color: grey">(64cfab7)</span></li>

 <li>tests/CMakeLists.txt <span style="color: grey">(b00a574)</span></li>

 <li>tests/testsocketlinereader.cpp <span style="color: grey">(77a9b4b)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/124312/diff/" style="margin-left: 3em;">View Diff</a></p>






  </td>
 </tr>
</table>







  </div>
 </body>
</html>