Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(128)

Side by Side Diff: dhcpcd-dbus.c

Issue 2865017: Put Introspect method on the correct interface, (Closed) Base URL: ssh://git@chromiumos-git/dhcpcd.git
Patch Set: Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | dhcpcd-dbus.conf » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * dhcpcd-dbus 2 * dhcpcd-dbus
3 * Copyright 2009 Roy Marples <roy@marples.name> 3 * Copyright 2009 Roy Marples <roy@marples.name>
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 dbus_connection_send(con, reply, NULL); 465 dbus_connection_send(con, reply, NULL);
466 dbus_message_unref(reply); 466 dbus_message_unref(reply);
467 return DBUS_HANDLER_RESULT_HANDLED; 467 return DBUS_HANDLER_RESULT_HANDLED;
468 } 468 }
469 469
470 static DBusHandlerResult 470 static DBusHandlerResult
471 msg_handler(DBusConnection *con, DBusMessage *msg, _unused void *data) 471 msg_handler(DBusConnection *con, DBusMessage *msg, _unused void *data)
472 { 472 {
473 #define IsMethod(msg, method) \ 473 #define IsMethod(msg, method) \
474 dbus_message_is_method_call(msg, DHCPCD_SERVICE, method) 474 dbus_message_is_method_call(msg, DHCPCD_SERVICE, method)
475 » if (IsMethod(msg, "Introspect")) { 475 » if (dbus_message_is_method_call(msg, DBUS_INTERFACE_INTROSPECTABLE,
476 "Introspect")) {
476 return introspect(con, msg); 477 return introspect(con, msg);
477 } else if (IsMethod(msg, "GetVersion")) { 478 } else if (IsMethod(msg, "GetVersion")) {
478 return version(con, msg, VERSION); 479 return version(con, msg, VERSION);
479 } else if (IsMethod(msg, "GetInterfaces")) { 480 } else if (IsMethod(msg, "GetInterfaces")) {
480 return dhcpcd_get_interfaces(con, msg); 481 return dhcpcd_get_interfaces(con, msg);
481 } else if (IsMethod(msg, "GetStatus")) { 482 } else if (IsMethod(msg, "GetStatus")) {
482 return return_status(con, msg); 483 return return_status(con, msg);
483 } else if (IsMethod(msg, "Rebind")) { 484 } else if (IsMethod(msg, "Rebind")) {
484 bind_interface(ifaces); /* XXX */ 485 bind_interface(ifaces); /* XXX */
485 return dbus_ack(con, msg); 486 return dbus_ack(con, msg);
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 run_script(const struct interface *ifp) 618 run_script(const struct interface *ifp)
618 { 619 {
619 syslog(LOG_DEBUG, "executing `%s', reason %s", 620 syslog(LOG_DEBUG, "executing `%s', reason %s",
620 ifp->name, ifp->state->reason); 621 ifp->name, ifp->state->reason);
621 #if 0 622 #if 0
622 /* push state over d-bus */ 623 /* push state over d-bus */
623 dhcpcd_dbus_configure(ifp, ifp->state->reason); 624 dhcpcd_dbus_configure(ifp, ifp->state->reason);
624 #endif 625 #endif
625 return 0; 626 return 0;
626 } 627 }
OLDNEW
« no previous file with comments | « no previous file | dhcpcd-dbus.conf » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698