diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2014-10-16 19:31:17 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2014-10-16 19:31:17 +0000 |
commit | 41772bfd42d7d1093bea6f84e69124450955bfe4 (patch) | |
tree | f6d4c021154aa6571bbfd838fb7657233aa4e6de /plugins/PluginUpdater/src/Utils.cpp | |
parent | 6659df4294af249406663de7a43745b30b8a7a61 (diff) |
added ability to lock update from dev version to stable
git-svn-id: http://svn.miranda-ng.org/main/trunk@10801 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/PluginUpdater/src/Utils.cpp')
-rw-r--r-- | plugins/PluginUpdater/src/Utils.cpp | 38 |
1 files changed, 24 insertions, 14 deletions
diff --git a/plugins/PluginUpdater/src/Utils.cpp b/plugins/PluginUpdater/src/Utils.cpp index 15b50d05ae..fb24329b92 100644 --- a/plugins/PluginUpdater/src/Utils.cpp +++ b/plugins/PluginUpdater/src/Utils.cpp @@ -246,21 +246,31 @@ bool ParseHashes(const TCHAR *ptszUrl, ptrT &baseUrl, SERVLIST &arHashes) char str[200];
while(fgets(str, SIZEOF(str), fp) != NULL) {
rtrim(str);
- Netlib_Logf(hNetlibUser,"Update: %s", str);
- char *p = strchr(str, ' ');
- if (p != NULL) {
- *p++ = 0;
- _strlwr(p);
-
- int dwCrc32;
- char *p1 = strchr(p, ' ');
- if (p1 == NULL)
- dwCrc32 = 0;
- else {
- *p1++ = 0;
- sscanf(p1, "%08x", &dwCrc32);
+ if (str[0] == ';') {
+ db_unset(NULL, MODNAME, DB_SETTING_DONT_SWITCH_TO_STABLE);
+ continue;
+ }
+ if (!strcmp(str, "DoNotSwitchToStable")) {
+ db_set_b(NULL, MODNAME, DB_SETTING_DONT_SWITCH_TO_STABLE, 1);
+ db_set_b(NULL, MODNAME, DB_SETTING_UPDATE_MODE, UPDATE_MODE_TRUNK);
+ }
+ else {
+ Netlib_Logf(hNetlibUser, "Update: %s", str);
+ char *p = strchr(str, ' ');
+ if (p != NULL) {
+ *p++ = 0;
+ _strlwr(p);
+
+ int dwCrc32;
+ char *p1 = strchr(p, ' ');
+ if (p1 == NULL)
+ dwCrc32 = 0;
+ else {
+ *p1++ = 0;
+ sscanf(p1, "%08x", &dwCrc32);
+ }
+ arHashes.insert(new ServListEntry(str, p, dwCrc32));
}
- arHashes.insert(new ServListEntry(str, p, dwCrc32));
}
}
fclose(fp);
|