On Thursday 29 May 2008 15:02, batosai at freenetproject.org wrote:
> Author: batosai
> Date: 2008-05-29 14:02:33 +0000 (Thu, 29 May 2008)
> New Revision: 20133
> 
> Modified:
>    trunk/apps/WoT/src/plugins/WoT/Identity.java
>    trunk/apps/WoT/src/plugins/WoT/IdentityInserter.java
> Log:
> Increment edition number after insert.

If you're inserting as a USK, you need to get the edition number from FCP. If 
you're inserting as an SSK you need to handle collisions.
> 
> Modified: trunk/apps/WoT/src/plugins/WoT/Identity.java
> ===================================================================
> --- trunk/apps/WoT/src/plugins/WoT/Identity.java      2008-05-29 12:54:19 UTC 
(rev 20132)
> +++ trunk/apps/WoT/src/plugins/WoT/Identity.java      2008-05-29 14:02:33 UTC 
(rev 20133)
> @@ -93,4 +93,12 @@
>               this.publishTrustList = publishTrustList;
>       }
>  
> +     public int getEdition() {
> +             return edition;
> +     }
> +
> +     public void setEdition(int edition) {
> +             this.edition = edition;
> +     }
> +
>  }
> 
> Modified: trunk/apps/WoT/src/plugins/WoT/IdentityInserter.java
> ===================================================================
> --- trunk/apps/WoT/src/plugins/WoT/IdentityInserter.java      2008-05-29 
> 12:54:19 
UTC (rev 20132)
> +++ trunk/apps/WoT/src/plugins/WoT/IdentityInserter.java      2008-05-29 
> 14:02:33 
UTC (rev 20133)
> @@ -101,6 +101,9 @@
>                       clientPut = new 
ClientPutDiskDir(identity.getFullInsertURI(), "WoTinserter", 
exportFile.getParent());
>                       fcp.sendMessage(clientPut);
>                       //TODO Cleanly handle errors. ATM, we don't even listen 
> to them !
> +                     
> +                     identity.setEdition(identity.getEdition() + 1);
> +                     db.store(identity);
>               }
>               catch (Exception e) {
>                       System.out.println("Export failed !");
> 
> _______________________________________________
> cvs mailing list
> cvs at freenetproject.org
> http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs
> 
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: 
<https://emu.freenetproject.org/pipermail/devl/attachments/20080805/4c738ea6/attachment.pgp>

Reply via email to