| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <config.h> | 5 #include <config.h> |
| 6 | 6 |
| 7 #include <signal.h> | 7 #include <signal.h> |
| 8 #include <stdio.h> | 8 #include <stdio.h> |
| 9 #include <stdlib.h> | 9 #include <stdlib.h> |
| 10 #include <string.h> | 10 #include <string.h> |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 server = NULL; | 86 server = NULL; |
| 87 delete service_manager; | 87 delete service_manager; |
| 88 service_manager = NULL; | 88 service_manager = NULL; |
| 89 DBus::default_dispatcher = NULL; | 89 DBus::default_dispatcher = NULL; |
| 90 delete dispatcher; | 90 delete dispatcher; |
| 91 dispatcher = NULL; | 91 dispatcher = NULL; |
| 92 if (main_loop != NULL) { | 92 if (main_loop != NULL) { |
| 93 g_main_loop_unref(main_loop); | 93 g_main_loop_unref(main_loop); |
| 94 main_loop = NULL; | 94 main_loop = NULL; |
| 95 } | 95 } |
| 96 // TODO(vlaviano): uncomment when we get a newer version of glog | 96 google::ShutdownGoogleLogging(); |
| 97 // google::ShutdownGoogleLogging(); | |
| 98 } | 97 } |
| 99 | 98 |
| 100 } // namespace cashew | 99 } // namespace cashew |
| 101 | 100 |
| 102 int main(int argc, char *argv[]) { | 101 int main(int argc, char *argv[]) { |
| 103 google::SetUsageMessage(argv[0]); | 102 google::SetUsageMessage(argv[0]); |
| 104 google::ParseCommandLineFlags(&argc, &argv, true); | 103 google::ParseCommandLineFlags(&argc, &argv, true); |
| 105 google::InitGoogleLogging(argv[0]); | 104 google::InitGoogleLogging(argv[0]); |
| 106 google::InstallFailureSignalHandler(); | 105 google::InstallFailureSignalHandler(); |
| 107 LOG(INFO) << PACKAGE_STRING; | 106 LOG(INFO) << PACKAGE_STRING; |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 cashew::CleanUpForExit(); | 152 cashew::CleanUpForExit(); |
| 154 exit(EXIT_FAILURE); | 153 exit(EXIT_FAILURE); |
| 155 } | 154 } |
| 156 | 155 |
| 157 DLOG(INFO) << "entering event loop"; | 156 DLOG(INFO) << "entering event loop"; |
| 158 g_main_loop_run(cashew::main_loop); | 157 g_main_loop_run(cashew::main_loop); |
| 159 DLOG(INFO) << "exited event loop"; | 158 DLOG(INFO) << "exited event loop"; |
| 160 cashew::CleanUpForExit(); | 159 cashew::CleanUpForExit(); |
| 161 exit(EXIT_SUCCESS); | 160 exit(EXIT_SUCCESS); |
| 162 } | 161 } |
| OLD | NEW |