Module: wine Branch: master Commit: bde25b2cb4296540ea8378f45e06adcc40bebdfa URL: http://source.winehq.org/git/wine.git/?a=commit;h=bde25b2cb4296540ea8378f45e...
Author: Hans Leidekker hans@codeweavers.com Date: Fri Dec 23 13:53:54 2011 +0100
msi: Use a common function to validate a product ID.
---
dlls/msi/action.c | 8 ++++++-- dlls/msi/events.c | 15 +-------------- dlls/msi/msipriv.h | 1 + 3 files changed, 8 insertions(+), 16 deletions(-)
diff --git a/dlls/msi/action.c b/dlls/msi/action.c index 77749d8..8505507 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -6871,7 +6871,7 @@ static UINT ACTION_RemoveEnvironmentStrings( MSIPACKAGE *package ) return rc; }
-static UINT ACTION_ValidateProductID( MSIPACKAGE *package ) +UINT msi_validate_product_id( MSIPACKAGE *package ) { LPWSTR key, template, id; UINT r = ERROR_SUCCESS; @@ -6884,7 +6884,6 @@ static UINT ACTION_ValidateProductID( MSIPACKAGE *package ) } template = msi_dup_property( package->db, szPIDTemplate ); key = msi_dup_property( package->db, szPIDKEY ); - if (key && template) { FIXME( "partial stub: template %s key %s\n", debugstr_w(template), debugstr_w(key) ); @@ -6895,6 +6894,11 @@ static UINT ACTION_ValidateProductID( MSIPACKAGE *package ) return r; }
+static UINT ACTION_ValidateProductID( MSIPACKAGE *package ) +{ + return msi_validate_product_id( package ); +} + static UINT ACTION_ScheduleReboot( MSIPACKAGE *package ) { TRACE("\n"); diff --git a/dlls/msi/events.c b/dlls/msi/events.c index 2c0431d..785d98a 100644 --- a/dlls/msi/events.c +++ b/dlls/msi/events.c @@ -389,20 +389,7 @@ static UINT ControlEvent_Reinstall( MSIPACKAGE *package, LPCWSTR argument, static UINT ControlEvent_ValidateProductID(MSIPACKAGE *package, LPCWSTR argument, msi_dialog *dialog) { - LPWSTR key, template; - UINT ret = ERROR_SUCCESS; - - template = msi_dup_property( package->db, szPIDTemplate ); - key = msi_dup_property( package->db, szPIDKEY ); - - if (key && template) - { - FIXME( "partial stub: template %s key %s\n", debugstr_w(template), debugstr_w(key) ); - ret = msi_set_property( package->db, szProductID, key ); - } - msi_free( template ); - msi_free( key ); - return ret; + return msi_validate_product_id( package ); }
static const WCHAR end_dialogW[] = {'E','n','d','D','i','a','l','o','g',0}; diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h index 619cfcb..dd8bd82 100644 --- a/dlls/msi/msipriv.h +++ b/dlls/msi/msipriv.h @@ -786,6 +786,7 @@ extern INSTALLSTATE msi_get_component_action( MSIPACKAGE *package, MSICOMPONENT extern INSTALLSTATE msi_get_feature_action( MSIPACKAGE *package, MSIFEATURE *feature ) DECLSPEC_HIDDEN; extern UINT msi_load_all_components( MSIPACKAGE *package ) DECLSPEC_HIDDEN; extern UINT msi_load_all_features( MSIPACKAGE *package ) DECLSPEC_HIDDEN; +extern UINT msi_validate_product_id( MSIPACKAGE *package ) DECLSPEC_HIDDEN;
/* record internals */ extern void MSI_CloseRecord( MSIOBJECTHDR * ) DECLSPEC_HIDDEN;