comparison cinst/mozilla.c @ 227:29467940b07b

Fixed naming of debugging print macro.
author Sascha Wilde <wilde@intevation.de>
date Thu, 27 Mar 2014 18:24:08 +0100
parents d7788db3bdde
children 19de529ce7fb
comparison
equal deleted inserted replaced
226:d7788db3bdde 227:29467940b07b
102 102
103 if ((cdir = getenv(envvar)) != NULL) 103 if ((cdir = getenv(envvar)) != NULL)
104 return cdir; 104 return cdir;
105 else 105 else
106 { 106 {
107 DEBUGFPRINT("DEBUG: FATAL! No %s in environment.\n", envvar); 107 DEBUGPRINTF("DEBUG: FATAL! No %s in environment.\n", envvar);
108 exit(ERR_MOZ_HOMELESS); 108 exit(ERR_MOZ_HOMELESS);
109 } 109 }
110 } 110 }
111 111
112 /** 112 /**
133 bool inprofile = false; 133 bool inprofile = false;
134 bool relative_path = false; 134 bool relative_path = false;
135 135
136 if ((inifile = fopen(inifile_name, "r")) != NULL) 136 if ((inifile = fopen(inifile_name, "r")) != NULL)
137 { 137 {
138 DEBUGFPRINT("DEBUG: Searching for profile paths in: '%s'\n", inifile_name); 138 DEBUGPRINTF("DEBUG: Searching for profile paths in: '%s'\n", inifile_name);
139 139
140 inifile_dirname = port_dirname(inifile_name); 140 inifile_dirname = port_dirname(inifile_name);
141 while (fgets(line, LINEBUFLEN, inifile) != NULL) 141 while (fgets(line, LINEBUFLEN, inifile) != NULL)
142 { 142 {
143 /* Determine if we are in an profile section */ 143 /* Determine if we are in an profile section */
161 snprintf(path, LINEBUFLEN, "%s/%s", inifile_dirname, value); 161 snprintf(path, LINEBUFLEN, "%s/%s", inifile_dirname, value);
162 else 162 else
163 strncpy(path, value, LINEBUFLEN); 163 strncpy(path, value, LINEBUFLEN);
164 if ((fqpath = port_realpath(path)) != NULL) 164 if ((fqpath = port_realpath(path)) != NULL)
165 { 165 {
166 DEBUGFPRINT("DEBUG: Found profile path: '%s'\n", fqpath); 166 DEBUGPRINTF("DEBUG: Found profile path: '%s'\n", fqpath);
167 strv_append(&dirs, fqpath, strlen(fqpath)); 167 strv_append(&dirs, fqpath, strlen(fqpath));
168 free (fqpath); 168 free (fqpath);
169 } 169 }
170 else 170 else
171 { 171 {
172 DEBUGFPRINT("DEBUG: WARN! Non existent profile path: '%s'\n", path); 172 DEBUGPRINTF("DEBUG: WARN! Non existent profile path: '%s'\n", path);
173 return_code |= WARN_MOZ_PROFILE_DOES_NOT_EXIST; 173 return_code |= WARN_MOZ_PROFILE_DOES_NOT_EXIST;
174 } 174 }
175 } 175 }
176 else if (str_equal(key, "IsRelative") && 176 else if (str_equal(key, "IsRelative") &&
177 str_starts_with(value, "1")) 177 str_starts_with(value, "1"))
180 } 180 }
181 fclose(inifile); 181 fclose(inifile);
182 } 182 }
183 else 183 else
184 { 184 {
185 DEBUGFPRINT("DEBUG: WARN! Could not open ini file: '%s'\n", inifile_name); 185 DEBUGPRINTF("DEBUG: WARN! Could not open ini file: '%s'\n", inifile_name);
186 return_code |= WARN_MOZ_FAILED_TO_OPEN_INI; 186 return_code |= WARN_MOZ_FAILED_TO_OPEN_INI;
187 } 187 }
188 return dirs; 188 return dirs;
189 } 189 }
190 190
228 snprintf(path, LINEBUFLEN, "%s/%s/%s/%s", 228 snprintf(path, LINEBUFLEN, "%s/%s/%s/%s",
229 confbase, 229 confbase,
230 confdirs[i], 230 confdirs[i],
231 mozdirent->d_name, 231 mozdirent->d_name,
232 "profiles.ini"); 232 "profiles.ini");
233 DEBUGFPRINT("DEBUG: checking for %s...\n", path); 233 DEBUGPRINTF("DEBUG: checking for %s...\n", path);
234 if ((fqpath = port_realpath(path)) != NULL) 234 if ((fqpath = port_realpath(path)) != NULL)
235 { 235 {
236 strv_append(&inis, fqpath, strlen(fqpath)); 236 strv_append(&inis, fqpath, strlen(fqpath));
237 DEBUGFPRINT("DEBUG: Found mozilla ini file: '%s'\n", fqpath); 237 DEBUGPRINTF("DEBUG: Found mozilla ini file: '%s'\n", fqpath);
238 free(fqpath); 238 free(fqpath);
239 } 239 }
240 } 240 }
241 } 241 }
242 closedir(mozdir); 242 closedir(mozdir);
243 } 243 }
244 else 244 else
245 { 245 {
246 DEBUGFPRINT("DEBUG: Could not open %s/%s\n", confbase, confdirs[i]); 246 DEBUGPRINTF("DEBUG: Could not open %s/%s\n", confbase, confdirs[i]);
247 } 247 }
248 } 248 }
249 if (inis == NULL) 249 if (inis == NULL)
250 { 250 {
251 DEBUGFPRINT("DEBUG: No ini files found - will do nothing!\n"); 251 DEBUGPRINTF("DEBUG: No ini files found - will do nothing!\n");
252 exit(WARN_MOZ_NO_PROFILES); 252 exit(WARN_MOZ_NO_PROFILES);
253 } 253 }
254 return inis; 254 return inis;
255 } 255 }
256 256
277 } 277 }
278 CERT_DestroyCertList(list); 278 CERT_DestroyCertList(list);
279 NSS_Shutdown(); 279 NSS_Shutdown();
280 } 280 }
281 else 281 else
282 DEBUGFPRINT("Could not open nss cer store in %s!", confdir); 282 DEBUGPRINTF("Could not open nss cer store in %s!", confdir);
283 } 283 }
284 284
285 285
286 int 286 int
287 main () 287 main ()

http://wald.intevation.org/projects/trustbridge/