summaryrefslogtreecommitdiffstats
path: root/src/InstallationProxy.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/InstallationProxy.c')
-rw-r--r--src/InstallationProxy.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/InstallationProxy.c b/src/InstallationProxy.c
index 6b267c4..8b53a2d 100644
--- a/src/InstallationProxy.c
+++ b/src/InstallationProxy.c
@@ -41,7 +41,7 @@ struct instproxy_status_data {
41 */ 41 */
42static void instproxy_lock(instproxy_client_t client) 42static void instproxy_lock(instproxy_client_t client)
43{ 43{
44 log_debug_msg("InstallationProxy: Locked\n"); 44 debug_info("InstallationProxy: Locked");
45 g_mutex_lock(client->mutex); 45 g_mutex_lock(client->mutex);
46} 46}
47 47
@@ -51,7 +51,7 @@ static void instproxy_lock(instproxy_client_t client)
51 */ 51 */
52static void instproxy_unlock(instproxy_client_t client) 52static void instproxy_unlock(instproxy_client_t client)
53{ 53{
54 log_debug_msg("InstallationProxy: Unlocked\n"); 54 debug_info("InstallationProxy: Unlocked");
55 g_mutex_unlock(client->mutex); 55 g_mutex_unlock(client->mutex);
56} 56}
57 57
@@ -131,7 +131,7 @@ instproxy_error_t instproxy_client_free(instproxy_client_t client)
131 property_list_service_client_free(client->parent); 131 property_list_service_client_free(client->parent);
132 client->parent = NULL; 132 client->parent = NULL;
133 if (client->status_updater) { 133 if (client->status_updater) {
134 log_debug_msg("joining status_updater"); 134 debug_info("joining status_updater");
135 g_thread_join(client->status_updater); 135 g_thread_join(client->status_updater);
136 } 136 }
137 if (client->mutex) { 137 if (client->mutex) {
@@ -174,7 +174,7 @@ instproxy_error_t instproxy_browse(instproxy_client_t client, instproxy_apptype_
174 p_apptype = plist_new_string("User"); 174 p_apptype = plist_new_string("User");
175 break; 175 break;
176 default: 176 default:
177 log_debug_msg("%s: unknown apptype %d given, using INSTPROXY_APPTYPE_USER instead\n", __func__, apptype); 177 debug_info("unknown apptype %d given, using INSTPROXY_APPTYPE_USER instead", apptype);
178 p_apptype = plist_new_string("User"); 178 p_apptype = plist_new_string("User");
179 break; 179 break;
180 } 180 }
@@ -187,7 +187,7 @@ instproxy_error_t instproxy_browse(instproxy_client_t client, instproxy_apptype_
187 res = instproxy_error(property_list_service_send_xml_plist(client->parent, dict)); 187 res = instproxy_error(property_list_service_send_xml_plist(client->parent, dict));
188 plist_free(dict); 188 plist_free(dict);
189 if (res != INSTPROXY_E_SUCCESS) { 189 if (res != INSTPROXY_E_SUCCESS) {
190 log_debug_msg("%s: could not send plist\n", __func__); 190 debug_info("could not send plist");
191 goto leave_unlock; 191 goto leave_unlock;
192 } 192 }
193 193
@@ -223,7 +223,7 @@ instproxy_error_t instproxy_browse(instproxy_client_t client, instproxy_apptype_
223 if (!strcmp(status, "BrowsingApplications")) { 223 if (!strcmp(status, "BrowsingApplications")) {
224 browsing = 1; 224 browsing = 1;
225 } else if (!strcmp(status, "Complete")) { 225 } else if (!strcmp(status, "Complete")) {
226 log_debug_msg("%s: Browsing applications completed\n"); 226 debug_info("Browsing applications completed");
227 res = INSTPROXY_E_SUCCESS; 227 res = INSTPROXY_E_SUCCESS;
228 } 228 }
229 free(status); 229 free(status);
@@ -264,7 +264,7 @@ static instproxy_error_t instproxy_perform_operation(instproxy_client_t client,
264 res = instproxy_error(property_list_service_receive_plist_with_timeout(client->parent, &dict, 30000)); 264 res = instproxy_error(property_list_service_receive_plist_with_timeout(client->parent, &dict, 30000));
265 instproxy_unlock(client); 265 instproxy_unlock(client);
266 if (res != INSTPROXY_E_SUCCESS) { 266 if (res != INSTPROXY_E_SUCCESS) {
267 log_debug_msg("%s: could not receive plist, error %d\n", __func__, res); 267 debug_info("could not receive plist, error %d", res);
268 break; 268 break;
269 } 269 }
270 if (dict) { 270 if (dict) {
@@ -279,7 +279,7 @@ static instproxy_error_t instproxy_perform_operation(instproxy_client_t client,
279 char *err_msg = NULL; 279 char *err_msg = NULL;
280 plist_get_string_val(err, &err_msg); 280 plist_get_string_val(err, &err_msg);
281 if (err_msg) { 281 if (err_msg) {
282 log_debug_msg("%s(%s): ERROR: %s\n", __func__, operation, err_msg); 282 debug_info("(%s): ERROR: %s", operation, err_msg);
283 free(err_msg); 283 free(err_msg);
284 } 284 }
285#endif 285#endif
@@ -303,9 +303,9 @@ static instproxy_error_t instproxy_perform_operation(instproxy_client_t client,
303 int percent; 303 int percent;
304 plist_get_uint_val(npercent, &val); 304 plist_get_uint_val(npercent, &val);
305 percent = val; 305 percent = val;
306 log_debug_msg("%s(%s): %s (%d%%)\n", __func__, operation, status_msg, percent); 306 debug_info("(%s): %s (%d%%)", operation, status_msg, percent);
307 } else { 307 } else {
308 log_debug_msg("%s(%s): %s\n", __func__, operation, status_msg); 308 debug_info("(%s): %s", operation, status_msg);
309 } 309 }
310#endif 310#endif
311 free(status_msg); 311 free(status_msg);
@@ -338,7 +338,7 @@ static gpointer instproxy_status_updater(gpointer arg)
338 338
339 /* cleanup */ 339 /* cleanup */
340 instproxy_lock(data->client); 340 instproxy_lock(data->client);
341 log_debug_msg("%s: done, cleaning up.\n", __func__); 341 debug_info("done, cleaning up.");
342 if (data->operation) { 342 if (data->operation) {
343 free(data->operation); 343 free(data->operation);
344 } 344 }
@@ -408,11 +408,11 @@ static instproxy_error_t instproxy_install_or_upgrade(instproxy_client_t client,
408 return INSTPROXY_E_INVALID_ARG; 408 return INSTPROXY_E_INVALID_ARG;
409 } 409 }
410 if (sinf && (plist_get_node_type(sinf) != PLIST_DATA)) { 410 if (sinf && (plist_get_node_type(sinf) != PLIST_DATA)) {
411 log_debug_msg("%s(%s): ERROR: sinf data is not a PLIST_DATA node!\n", __func__, command); 411 debug_info("(%s): ERROR: sinf data is not a PLIST_DATA node!", command);
412 return INSTPROXY_E_INVALID_ARG; 412 return INSTPROXY_E_INVALID_ARG;
413 } 413 }
414 if (metadata && (plist_get_node_type(metadata) != PLIST_DATA)) { 414 if (metadata && (plist_get_node_type(metadata) != PLIST_DATA)) {
415 log_debug_msg("%s(%s): ERROR: metadata is not a PLIST_DATA node!\n", __func__, command); 415 debug_info("(%s): ERROR: metadata is not a PLIST_DATA node!", command);
416 return INSTPROXY_E_INVALID_ARG; 416 return INSTPROXY_E_INVALID_ARG;
417 } 417 }
418 418
@@ -439,7 +439,7 @@ static instproxy_error_t instproxy_install_or_upgrade(instproxy_client_t client,
439 plist_free(dict); 439 plist_free(dict);
440 440
441 if (res != INSTPROXY_E_SUCCESS) { 441 if (res != INSTPROXY_E_SUCCESS) {
442 log_debug_msg("%s: could not send plist, error %d\n", __func__, res); 442 debug_info("could not send plist, error %d", res);
443 return res; 443 return res;
444 } 444 }
445 445
@@ -532,7 +532,7 @@ instproxy_error_t instproxy_uninstall(instproxy_client_t client, const char *app
532 plist_free(dict); 532 plist_free(dict);
533 533
534 if (res != INSTPROXY_E_SUCCESS) { 534 if (res != INSTPROXY_E_SUCCESS) {
535 log_debug_msg("%s: could not send plist, error %d\n", __func__, res); 535 debug_info("could not send plist, error %d", res);
536 return res; 536 return res;
537 } 537 }
538 538
@@ -567,13 +567,13 @@ instproxy_error_t instproxy_lookup_archives(instproxy_client_t client, plist_t *
567 plist_free(dict); 567 plist_free(dict);
568 568
569 if (res != INSTPROXY_E_SUCCESS) { 569 if (res != INSTPROXY_E_SUCCESS) {
570 log_debug_msg("%s: could not send plist, error %d\n", __func__, res); 570 debug_info("could not send plist, error %d", res);
571 goto leave_unlock; 571 goto leave_unlock;
572 } 572 }
573 573
574 res = instproxy_error(property_list_service_receive_plist(client->parent, result)); 574 res = instproxy_error(property_list_service_receive_plist(client->parent, result));
575 if (res != INSTPROXY_E_SUCCESS) { 575 if (res != INSTPROXY_E_SUCCESS) {
576 log_debug_msg("%s: could not receive plist, error %d\n", __func__, res); 576 debug_info("could not receive plist, error %d", res);
577 goto leave_unlock; 577 goto leave_unlock;
578 } 578 }
579 579
@@ -640,7 +640,7 @@ instproxy_error_t instproxy_archive(instproxy_client_t client, const char *appid
640 plist_free(dict); 640 plist_free(dict);
641 641
642 if (res != INSTPROXY_E_SUCCESS) { 642 if (res != INSTPROXY_E_SUCCESS) {
643 log_debug_msg("%s: could not send plist, error %d\n", __func__, res); 643 debug_info("could not send plist, error %d", res);
644 return res; 644 return res;
645 } 645 }
646 return instproxy_create_status_updater(client, status_cb, "Archive"); 646 return instproxy_create_status_updater(client, status_cb, "Archive");
@@ -686,7 +686,7 @@ instproxy_error_t instproxy_restore(instproxy_client_t client, const char *appid
686 plist_free(dict); 686 plist_free(dict);
687 687
688 if (res != INSTPROXY_E_SUCCESS) { 688 if (res != INSTPROXY_E_SUCCESS) {
689 log_debug_msg("%s: could not send plist, error %d\n", __func__, res); 689 debug_info("could not send plist, error %d", res);
690 return res; 690 return res;
691 } 691 }
692 return instproxy_create_status_updater(client, status_cb, "Restore"); 692 return instproxy_create_status_updater(client, status_cb, "Restore");
@@ -732,7 +732,7 @@ instproxy_error_t instproxy_remove_archive(instproxy_client_t client, const char
732 plist_free(dict); 732 plist_free(dict);
733 733
734 if (res != INSTPROXY_E_SUCCESS) { 734 if (res != INSTPROXY_E_SUCCESS) {
735 log_debug_msg("%s: could not send plist, error %d\n", __func__, res); 735 debug_info("could not send plist, error %d", res);
736 return res; 736 return res;
737 } 737 }
738 return instproxy_create_status_updater(client, status_cb, "RemoveArchive"); 738 return instproxy_create_status_updater(client, status_cb, "RemoveArchive");