OLD | NEW |
1 // Copyright (c) 2006, Google Inc. | 1 // Copyright (c) 2006, Google Inc. |
2 // All rights reserved. | 2 // All rights reserved. |
3 // | 3 // |
4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
6 // met: | 6 // met: |
7 // | 7 // |
8 // * Redistributions of source code must retain the above copyright | 8 // * Redistributions of source code must retain the above copyright |
9 // notice, this list of conditions and the following disclaimer. | 9 // notice, this list of conditions and the following disclaimer. |
10 // * Redistributions in binary form must reproduce the above | 10 // * Redistributions in binary form must reproduce the above |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 [moduleInfoScanner scanUpToString:@"\n" intoString:&moduleInfo]; | 75 [moduleInfoScanner scanUpToString:@"\n" intoString:&moduleInfo]; |
76 [parts addObject:moduleInfo]; | 76 [parts addObject:moduleInfo]; |
77 } | 77 } |
78 | 78 |
79 [str release]; | 79 [str release]; |
80 | 80 |
81 return parts; | 81 return parts; |
82 } | 82 } |
83 | 83 |
84 //============================================================================= | 84 //============================================================================= |
85 static NSString *CompactIdentifier(NSString *uuid) { | |
86 NSMutableString *str = [NSMutableString stringWithString:uuid]; | |
87 [str replaceOccurrencesOfString:@"-" withString:@"" options:0 | |
88 range:NSMakeRange(0, [str length])]; | |
89 | |
90 return str; | |
91 } | |
92 | |
93 //============================================================================= | |
94 static void Start(Options *options) { | 85 static void Start(Options *options) { |
95 NSURL *url = [NSURL URLWithString:options->uploadURLStr]; | 86 NSURL *url = [NSURL URLWithString:options->uploadURLStr]; |
96 HTTPMultipartUpload *ul = [[HTTPMultipartUpload alloc] initWithURL:url]; | 87 HTTPMultipartUpload *ul = [[HTTPMultipartUpload alloc] initWithURL:url]; |
97 NSMutableDictionary *parameters = [NSMutableDictionary dictionary]; | 88 NSMutableDictionary *parameters = [NSMutableDictionary dictionary]; |
98 NSArray *moduleParts = ModuleDataForSymbolFile(options->symbolsPath); | 89 NSArray *moduleParts = ModuleDataForSymbolFile(options->symbolsPath); |
99 NSMutableString *compactedID = | 90 NSMutableString *compactedID = |
100 [NSMutableString stringWithString:[moduleParts objectAtIndex:3]]; | 91 [NSMutableString stringWithString:[moduleParts objectAtIndex:3]]; |
101 [compactedID replaceOccurrencesOfString:@"-" withString:@"" options:0 | 92 [compactedID replaceOccurrencesOfString:@"-" withString:@"" options:0 |
102 range:NSMakeRange(0, [compactedID length])]; | 93 range:NSMakeRange(0, [compactedID length])]; |
103 | 94 |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; | 174 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; |
184 Options options; | 175 Options options; |
185 | 176 |
186 bzero(&options, sizeof(Options)); | 177 bzero(&options, sizeof(Options)); |
187 SetupOptions(argc, argv, &options); | 178 SetupOptions(argc, argv, &options); |
188 Start(&options); | 179 Start(&options); |
189 | 180 |
190 [pool release]; | 181 [pool release]; |
191 return options.success ? 0 : 1; | 182 return options.success ? 0 : 1; |
192 } | 183 } |
OLD | NEW |